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

    (@antoineh)

    You can try adding these lines to your wp-config.php file and lowering the values (e.g. 50% of the default value):

    define( 'FOOTBALLPOOL_RECALC_STEP2_DIV', 50 );
    define( 'FOOTBALLPOOL_RECALC_STEP3_DIV', 100 );
    define( 'FOOTBALLPOOL_RECALC_STEP4_DIV', 50 );
    define( 'FOOTBALLPOOL_RECALC_STEP5_DIV', 50 );
    define( 'FOOTBALLPOOL_RECALC_STEP6_DIV', 4 );

    These constants handle the amount of data that is processed in one calculation step.

    Thread Starter kirstiej

    (@kirstiej)

    Thanks, Antoine, I’ll give that a try! I managed to get it to calculate on about the 8th attempt, but hopefully this helps for future steps!

    Plugin Author AntoineH

    (@antoineh)

    Hope it helps. In the future I may have to redo the calculation to make it more suitable for large(r) amounts of data.

    Thread Starter kirstiej

    (@kirstiej)

    Adding this to wp-config.php produces this error:

    Notice: Constant FOOTBALLPOOL_RECALC_STEP6_DIV already defined in /home/people2people/public_html/footy/wp-config.php on line 86

    Do I need to modify football-pool/admin/class-football-pool-admin-score-calculation.php as well?

    Plugin Author AntoineH

    (@antoineh)

    I quess you are using an older version of the plugin. If you change the lines with these constants in define.php (root of plugin folder) to:

    if ( ! defined( 'FOOTBALLPOOL_RECALC_STEP2_DIV' ) ) define( 'FOOTBALLPOOL_RECALC_STEP2_DIV', 50 );
    if ( ! defined( 'FOOTBALLPOOL_RECALC_STEP3_DIV' ) ) define( 'FOOTBALLPOOL_RECALC_STEP3_DIV', 100 );
    if ( ! defined( 'FOOTBALLPOOL_RECALC_STEP4_DIV' ) ) define( 'FOOTBALLPOOL_RECALC_STEP4_DIV', 50 );
    if ( ! defined( 'FOOTBALLPOOL_RECALC_STEP5_DIV' ) ) define( 'FOOTBALLPOOL_RECALC_STEP5_DIV', 50 );
    if ( ! defined( 'FOOTBALLPOOL_RECALC_STEP6_DIV' ) ) define( 'FOOTBALLPOOL_RECALC_STEP6_DIV', 4 );

    The notice should be gone.

    Later versions of the plugin already have this code.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error when calculating scores’ is closed to new replies.