• Hi,

    everytime i want to calculate the scores this shows up:

    Error message:
    SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

    I hope you can help. πŸ™‚

    ___________________________________________________________________

    By the way: Before this error showed up, the calculation always stopped writing this:
    define( ‘FOOTBALLPOOL_RECALC_STEP2_DIV’, 25 );
    define( ‘FOOTBALLPOOL_RECALC_STEP3_DIV’, 50 );
    define( ‘FOOTBALLPOOL_RECALC_STEP4_DIV’, 25 );
    define( ‘FOOTBALLPOOL_RECALC_STEP5_DIV’, 25 );
    define( ‘FOOTBALLPOOL_RECALC_STEP6_DIV’, 2 );

    into the wp-config didn’t help.

    Thank you for your help!

    PS: We have at the moment around 600 users and 60 games being tipped per week, if you need this information.

    https://ww.wp.xz.cn/plugins/football-pool/

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

    (@antoineh)

    If you use Chrome you can use the developer tools to look at the JSON data that was sent. More info here: http://stackoverflow.com/a/13920077

    Maybe there is some server error being sent by PHP. Those can’t be parsed as JSON, resulting in the syntax error you’re seeing.

    Thread Starter tom.545

    (@tom545-1)

    Ok, thanks for the help, i saved one file in utf-8 instead of Ansi πŸ™‚

    But the second Problem is still there, the calculattion of the scores always stops, the code i mentioned in the 1st post is not helping…

    Plugin Author AntoineH

    (@antoineh)

    You can try lowering the value(s) for the step(s) even more.

    Thread Starter tom.545

    (@tom545-1)

    Do I have to consider anything with lowering the values?
    Can i try this:
    define( ‘FOOTBALLPOOL_RECALC_STEP2_DIV’, 10 );
    define( ‘FOOTBALLPOOL_RECALC_STEP3_DIV’, 10 );
    define( ‘FOOTBALLPOOL_RECALC_STEP4_DIV’, 10 );
    define( ‘FOOTBALLPOOL_RECALC_STEP5_DIV’, 10 );
    define( ‘FOOTBALLPOOL_RECALC_STEP6_DIV’, 1 );

    ?

    Thread Starter tom.545

    (@tom545-1)

    And:

    I think the solution can’t be to lower the values, sometimes later, you have so many users or so many games, that you cant lower the values anymore?

    You know what i mean, it does help but it doesn’t fix the issue i think.

    Plugin Author AntoineH

    (@antoineh)

    You are right. There is a limit to the amount of data the plugin can handle. But. Don’t know where this limit is. I only used it myself for small competitions.

    Thread Starter tom.545

    (@tom545-1)

    Hmm ok, i hope it does not come to an end with 60 games per week.

    By the way, maybe you can change the save button on the prediction sheet from the left bottom to the top and maybe there is an option that the played games are not shown in the prediciton sheet? Cause it’s getting way to big at our site. πŸ™‚ You have to scroll and scroll you know πŸ˜€

    Sorry for my english, i am from germany. πŸ™‚

    Plugin Author AntoineH

    (@antoineh)

    Hi,

    I already made an extension for the plugin that only displays open matches some time ago for another user. Download it here. It simply filters the data set and you can change it to your needs.

    There is also a hook on the prediction form page and shortcode for the outputted HTML. So you should be able to extend the plugin to also show a save button at the top. If I remember correctly I also made that extension as well in the past. I can check my dev laptop tonight to see if it is still there.

    Thread Starter tom.545

    (@tom545-1)

    That would be very nice, tomorrow i have some time and i will look in the code if i am able to do it.

    Thanks, for taking care of my problems so well!

    Maybe you can make a list of all plugins you wrote for someone? πŸ™‚

    Plugin Author AntoineH

    (@antoineh)

    Here’s the extension that adds a save button at the top of the form.

    Thread Starter tom.545

    (@tom545-1)

    I’m jsut interested, did you made any more plugins/extensions?

    Plugin Author AntoineH

    (@antoineh)

    I’ve got quite a few, but I don’t know if they all are of any use for others. Mostly they were build to answer a specific need from forum user.

    But if I find some time, I will add them online with a short description.

    Thread Starter tom.545

    (@tom545-1)

    Thank you sir! πŸ™‚

    Thread Starter tom.545

    (@tom545-1)

    Hmm i lowered the values to this:
    define( ‘FOOTBALLPOOL_RECALC_STEP2_DIV’, 10 );
    define( ‘FOOTBALLPOOL_RECALC_STEP3_DIV’, 10 );
    define( ‘FOOTBALLPOOL_RECALC_STEP4_DIV’, 10 );
    define( ‘FOOTBALLPOOL_RECALC_STEP5_DIV’, 10 );
    define( ‘FOOTBALLPOOL_RECALC_STEP6_DIV’, 1 );

    and i still get the error-message

    maybe to many games or players?

    Plugin Author AntoineH

    (@antoineh)

    Hi, yes I think you are running into the max the plugin can handle. Maybe someone at your hosting provider can help determining if timeouts are really causing the problem. And what the cause of those timeouts are (memory, CPU, ???). I have no experience in this matter so I can’t help here.

    There is also a setting that disables the AJAX calculation. This may be easier in debugging the process.

    define( 'FOOTBALLPOOL_RANKING_CALCULATION_NOAJAX', true );

Viewing 15 replies - 1 through 15 (of 21 total)

The topic ‘Error before calculating the Ranking’ is closed to new replies.