• Resolved AVielle

    (@avielle)


    Hi Antoine,

    I’m experiencing a very weird situation.
    When I put the following line
    [fp-league-info league=”7″ info=”numplayers” format=”%d players”]
    inside a page of the local version of my site (run with Wampserver) I get the right answer on my page : “2 players”.
    But when I put the exactly same line inside a page of the online version of my site I get the answer : “0 players”.
    I just duplicated the online version to the local version so they should be identical. I also checked again and again that the league with ID=7 exists in my online version and has 2 registered players just like in my local version.
    The shortcode works when I use the “name” option on both local and online versions.
    But both numplayers and player names options work on the local version but not online.
    Any idea for such a weird behaviour ?

    Thanks for your help !
    Arnaud

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

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

    (@antoineh)

    Just a wild shot: have you tried format="%s players"? Maybe a problem in the string/number conversion that’s different between wamp and the online version.

    Thread Starter AVielle

    (@avielle)

    Thanks Antoine.
    But same result. With “%f players” I get 0,0000 players…

    Plugin Author AntoineH

    (@antoineh)

    To be honest, I haven’t got a clue why this is not working. Especially when you say the database content is the same.

    Thread Starter AVielle

    (@avielle)

    I see that the fp-league-info shortcode uses get_pool_ranking function that starts with

    $cache_key = "fp_get_pool_ranking_r{$ranking_id}_l{$league_id}";
    		$rows = wp_cache_get( $cache_key );

    I don’t understand what is it for but guess it has something to do with the cache ? Could it be a way to explore ?

    PS : I have desactivated every single plugin and still has no result for the numplayers and playernames options…

    Thread Starter AVielle

    (@avielle)

    Hi Antoine,

    Just made a test in my local version : I have set the first match date to last week, gave a fake score and processed the calculation.
    Then the fp-league-info shortcode gives the expected values even with the numplayers and playernames options…
    Could be a bug related to the ranking table when no match score has been recorded yet ?

    Plugin Author AntoineH

    (@antoineh)

    Ahh damn, the shortcode always used the ranking table for its information, but I fixed that in my local dev version some time ago. When checking the code I only checked my dev version and completely missed the fact that this version wasn’t released yet.

    I think your problem is solved when you download the dev version of the shortcode class.

    Thread Starter AVielle

    (@avielle)

    It is !
    Thanks a lot Antoine !

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Troubles with fp-league-info shortcode’ is closed to new replies.