Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
5.0 and Gantry Framework Themes
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2012 - 8:14 pm

Mike, so I assume you have played with forum - integration - page and permalink, the display multiple and display in loop options?  different combinations of them....

on that same page, also just make sure that is the wp page selected for the forum view...

can you look on forum - toolbox - error log and see if any errors listed?  if so, might be worth clearing, visiting the forum page and checking again to make sure they are new... and let us know if any...

Avatar
Cliff Pfeifer
Denver, CO
Member
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2012 - 8:56 pm

Hi, thanks for the info, I was able to replicate the issue. I figured this out, it's simpler than you might think. Since there are no errors, it's not a conflict of any kind, so getting it to work doesn't require modifying source the code of either plugin.

Basically, when Gantry renders it's main body position it does so through what we call a layout. The mainbody layout is called in though the index.php file and is basically a template for the loop(s) / content area. It needs to be separated so it never affects the widget layouts and grid system that is the core of Gantry. 

In the layout file, there is a function that dynamically calls in the specific page type - page.php, single.php ECT. In this case, the Gantry function does not recognize or include the function that builds the Simple Press page, so nothing happens.

To fix this, you need to create a custom page template in Gantry that uses a custom layout. This process differs from the traditional method. Fortunately, I wrote a detailed article on how to do this last month, you can view it here: http://www.rockettheme.com/mag.....-wordpress

Once you've done all of that, all you need to do in your new layout file is replace this code:

<?php $this->include_type();?>

With this code:

<?php sp_process_template(); ?>

In your forum page editor, assign your page to use the template you created and it should load up fine.

I tested this and it worked for me, it should work in any Gantry based theme. This is the first time I've ever used Simple Press so I haven't gone through all the features and I had to dig through a lot of files to find that function, so let me know if that is the best one to use or if there are other suggestions or issues. It's good to know it was just a configuration issue and not a serious programming conflict. Cheers.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 25, 2012 - 9:48 pm

Cliff, thanks for the input...  A bit worried that by calling that function, you may miss out on a some sp stuff...

Is there any reason that the call cannot be to the standard wp function for outputting page content, the function the_content() ?

that will generate some of the wp actions and filters that sp uses for its api...  there are a few things that potentially happen before and after the sp_process_template() call...

being on its own layout (and thus page) it would only affect the forum page...

Avatar
Cliff Pfeifer
Denver, CO
Member
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 12:32 am

Hi, I'm glad to help, and the issue you bring up is something I thought about, that's why I asked. the_content() won't work in this case. The original layout function would point to our page.php file in this instance, which contains the loop and that function and it produces no output. Why it doesn't work that way appears to be the issue we're facing here. 

That function seems to do the trick in terms of getting it to load up, so I think we're on the right track. Again, this is my first time looking at this so I'm not familiar with the missing processes that you're speaking of or what consequences might occur from that issue. If you say there's more to it, I believe you, I just wonder if there might be another way to call all of that information from SP?

I'm just not familiar with how this is designed and there is a lot going on and a lot of files to look through. If there are some final output files, functions, variables, filters ECT that I should be looking at, point me in the right direction. I'm just trying to find a solution that doesn't require hacking up core files on either end. Any suggestions are appreciated.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 11:43 am

the forum display is largely hinged on a filter in place 'the_content' which is fired by the wp the_content() function...  we have run into issues before where some themes and/or plugins have used that filter multiple times within the loop and sometimes outside the loop...  it has caused issues but so far, two options on the forum - integration - page and permalink admin panel have been able to handle these cases... those options would be the display multiple times and display within loop...  The OP said he tried those to no avail...

might suggest trying:

do_action('the_content', '');

instead of the sp_process_template() call... not sure it will work, but worth a try...  My example has an empty second argument to the action...  It really should be any content on the wp page itself if it exists since it will be output before the forum (ie a banner or ad or something)...  I just dont know how you would get at it in your theme...

alternately, instead of the do_action() or calling sp_process_template(), you might try a call to the parent function of ours which calls that.  It is also the routine actually hooked into 'the_content'.  That function would be:

sp_render_forum('');

again, the actual argument would be best to be the wp page content and not an empty string...

thanks!

Avatar
MikeMSD
Member
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 5:30 pm

Thanks for the help guys. Unfortunately I still don't have it all the way working. When I try:

sp_process_template();

The forum loads, but I can't navigate it. If I click into a link, I get a 404 not found error.

I also tried:

do_action('the_content', '');

and

sp_render_forum('');

but all I got with those was a blank page again.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 5:53 pm

for the former, what are the links you are clicking on?  ie what is the url?  does it look right?

Avatar
MikeMSD
Member
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 8:10 pm

You can check out http://www.toosaucedtopork.com/testnew.

The URL looks right, but then it redirects and breaks. For example if I click "Introduce Yourself", the URL is "http://www.toosaucedtopork.com/testnew/introduce-yourself/" but when I click the link, I am redirected to "http://www.toosaucedtopork.com/2012/01/introduce-yourself/"

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2012 - 8:14 pm

after you changed, the page, did you update the forum permalink on forum - integration - page and permalink?    please try it...

Avatar
Cliff Pfeifer
Denver, CO
Member
Free Members
sp_UserOfflineSmall Offline
Feb 27, 2012 - 12:24 am

Hi, I also tried a few things. Looking at the sp_render_forum function definitely pointed me in the right direction and I think I found the real issue. In the simple-press plugin directory -> sp-startup -> forum -> sp-forum-framework.php - line 228.

This code
if (!did_action('wp_head')) return '';

If I comment it out, everything loads up fine with the_content() call. 

Now that I have a solid idea of what the issue is, I can ask our developers as well, although I'm not sure what could be done on our end. This is saying if the wp_head hasn't been run, to return nothing. That would make sense in terms of nothing loading on the page. Gantry doesn't use the WP wp_head, we use $gantry->displayHead(); which is a completely custom method for building the header. Really, we do not use many of the standard wp functions, Gantry is kind of it's own thing. I'm happy to try any suggestions you might have. Hope that helps.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625