WordPress.org

Ready to get started?Download WordPress

Forums

Football Pool
[resolved] No content team pages (13 posts)

  1. killbert72
    Member
    Posted 1 year ago #

    Hi,

    Sorry to flood you with questions. I have a fresh install of the latest version of your plugin and installed the 2014 schedule you put up yesterday (I made one earlier myself which I thought was causing the problem).

    However, even with your schedule file, If I click on a team link from the matches overview page, I get an empty page. What have I missed? I am expecting a page with team information, photo's etc?

    See: http://www.gamecampaigns.com/tournament/

    http://wordpress.org/plugins/football-pool/

  2. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. killbert72
    Member
    Posted 1 year ago #

    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"]

     

  4. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. killbert72
    Member
    Posted 1 year ago #

    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?

  6. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  7. killbert72
    Member
    Posted 1 year ago #

    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....

  8. killbert72
    Member
    Posted 1 year ago #

    team = theme...

  9. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  10. killbert72
    Member
    Posted 1 year ago #

    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...

  11. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  12. killbert72
    Member
    Posted 1 year ago #

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

    Duizend punten!

  13. killbert72
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.