WordPress.org

Support

Support » Plugins and Hacks » Football Pool » [Resolved] No content team pages

[Resolved] No content team pages

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author AntoineH

    @antoineh

    Well, this is weird. Some pages are working (e.g. http://www.gamecampaigns.com/tournament/groups/?group=2 and http://www.gamecampaigns.com/tournament/stadiums/?stadium=1), but the teams page isn’t working. And to be honest, I haven’t got a clue why this isn’t working.

    Can you check if there is a page in the WP admin with a slug value ‘teams’? You can find this value when you hover over the page title and click the ‘Quick Edit’ link.

    I have three pages that are a bit ‘special’ in as they have received a “-” sign before their name: -venues, -teams, -groups.

    I did not put that “-” in front by the way…

    the page “-teams”” has the slug:

    [fp-link slug=”teams”]

     

    Plugin Author AntoineH

    @antoineh

    The “-” indicates that they are a child of another page. The plugin creates these pages on install and adds them as children of the matches page.

    But this doesn’t help. I was kinda hoping that there was something wrong with this page, but this seems normal.

    Just to be sure, shouldn’t the page -venues give an overview of all stadiums on one page? Because that is not happening at the moment. But i am not sure if this should be the case.

    I am using U-design as theme, but that is pretty robust and not causing issues in my opinion….

    You mind if I grant you access to my site so you can have a look?

    Plugin Author AntoineH

    @antoineh

    Can you try the following?

    Change line 415 in classes\class-football-pool.php to

    $content = "page ID = {$page_id}<br>";
    $content .= "option = " . Football_Pool_Utils::get_fp_option( 'page_id_teams' );

    If the teams page shows this text, then the problem is that for some reason the page ID for the teams page is not stored correctly in the plugin options. The two numbers should be the same, but in your case (if these debug lines are shown) I guess you will see two different numbers.

    I just checked to preview my site in another team, and there it displays the pages correctly, so I am guessing that it must be my beloved U-design theme that is causing the problem after all….

    team = theme…

    Plugin Author AntoineH

    @antoineh

    I can’t test the U-design as it is a paid theme. Did you try one of the standard WP themes? See if that makes any difference?

    Ah, I’m a bit late 🙂 Didn’t see your update.

    Yes, so that is the culprit….the pages display correctly in the standard themes like Twenty Twelve etc.

    No, how do I find a solution? i’d hate to change my entire site’s theme…

    Plugin Author AntoineH

    @antoineh

    What you can try is to play around a bit with the priority of the action that adds the content to the team page. Look for the line that reads

    add_filter( 'the_content', array( 'Football_Pool', 'the_content' ) );

    in the /football-pool.php file and change it to

    add_filter( 'the_content', array( 'Football_Pool', 'the_content' ), XX );

    Where XX is a number. The higher the number, the later the filter is applied. My guess is that the theme is overwriting the content in some cases and if you give my action a higher number it will make sure my action is executed after the actions in the theme. But that is just a guess.
    A disadvantage for this is that you would have to change this everytime you upgrade the plugin.

    Another approach would be to debug the theme files. Look for add_filter() calls for ‘the_content’ in the theme’s PHP files and see if they are adding content in the filter functions, or replacing it.

    Put in 90, worked like a charm! You are a star!

    Duizend punten!

    Found the real culprit! Did a search for add_filter( ‘the_content’ and found this line in my Theme’s functions.php:

    add_filter(‘the_content’, ‘autoinsert_rel_prettyPhoto’);

    I had that prettyPhoto script turned on but wasn’t using it. Switching in off in my theme option page solved the problem, even without the number in football-pool.php, so your plugin is back to standard!

    Thanks man, your support is amazing!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] No content team pages’ is closed to new replies.
Skip to toolbar