Title: harmenzon's Replies | WordPress.org

---

# harmenzon

  [  ](https://wordpress.org/support/users/harmenzon/)

 *   [Profile](https://wordpress.org/support/users/harmenzon/)
 *   [Topics Started](https://wordpress.org/support/users/harmenzon/topics/)
 *   [Replies Created](https://wordpress.org/support/users/harmenzon/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/harmenzon/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/harmenzon/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/harmenzon/engagements/)
 *   [Favorites](https://wordpress.org/support/users/harmenzon/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Automated recalulation of scores](https://wordpress.org/support/topic/automated-recalulation-of-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/automated-recalulation-of-scores/#post-10422488)
 * [@deshke](https://wordpress.org/support/users/deshke/): It was also very easy
   for me to set up wp-cli on Windows (xampp). For me it was not possible to set
   it up on unix (synology). I would recommend the wp-cli approach. Just let me 
   know if that fails, then I will share the code that I have so far.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Automated recalulation of scores](https://wordpress.org/support/topic/automated-recalulation-of-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/automated-recalulation-of-scores/#post-10414560)
 * Success!!
    I made a copy of the `admin.js` file and commented out the `bar`. 
   Now it works. Not sure if it will keep on working since `"fp_recalc_nonce":"f91bd73dbc"`
   keeps on changing. Thanks for your help so far!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Automated recalulation of scores](https://wordpress.org/support/topic/automated-recalulation-of-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/automated-recalulation-of-scores/#post-10414524)
 * After I forced a calculation within Admin Help, a reload of my calculation html
   page gives me the response that a calculation is started. Unfortunately, still
   with an error and the calculation does not seem to complete. Any suggestion?
 *     ```
       Uncaught TypeError: bar.progressbar is not a function
           at Object.success (admin.js:143)
           at u (jquery.min.js:2)
           at Object.fireWith [as resolveWith] (jquery.min.js:2)
           at k (jquery.min.js:2)
           at XMLHttpRequest.<anonymous> (jquery.min.js:2)
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Automated recalulation of scores](https://wordpress.org/support/topic/automated-recalulation-of-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/automated-recalulation-of-scores/#post-10414497)
 * Ok. If I replace `live` with `on` within `jquery.colorbox-min.js` then I get 
   a message that a calculation is already started. Any suggestion?
 *     ```
       Berekening scores en stand
       Er is al berekening van de stand bezig. Wacht a.u.b. tot deze is geëindigd voor een nieuwe wordt gestart.
   
       If - for some reason - this message is wrong, see the help page for tips on how to force a calculation start.
       ```
   
 * And also the next error, but maybe minor:
 *     ```
       Uncaught TypeError: g[0].style.removeAttribute is not a function
           at y (jquery.colorbox-min.js:4)
           at n (jquery.colorbox-min.js:4)
           at HTMLDivElement.complete (jquery.colorbox-min.js:4)
           at HTMLDivElement.r.complete (jquery.min.js:2)
           at u (jquery.min.js:2)
           at Object.fireWith [as resolveWith] (jquery.min.js:2)
           at u (jquery.min.js:2)
           at Function.w.fx.tick (jquery.min.js:2)
           at at (jquery.min.js:2)
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Automated recalulation of scores](https://wordpress.org/support/topic/automated-recalulation-of-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/automated-recalulation-of-scores/#post-10414447)
 * Thanks. Unfortunately, another error pops up. This might not be the way forward…
 *     ```
       Uncaught TypeError: e(...).live is not a function
           at at (jquery.colorbox-min.js:4)
           at Function.e.fn.(anonymous function).e.(anonymous function) [as colorbox] (https://services.maptm.nl/intranet/wp-content/plugins/football-pool/assets/libs/colorbox/jquery.colorbox-min.js:4:4621)
           at Object.success (admin.js:127)
           at u (jquery.min.js:2)
           at Object.fireWith [as resolveWith] (jquery.min.js:2)
           at k (jquery.min.js:2)
           at XMLHttpRequest.<anonymous> (jquery.min.js:2)
       ```
   
 * And this is the code so far:
 *     ```
       <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
   
       <script src="wp-content/plugins/football-pool/assets/admin/admin.js"></script>
   
       <!--<script src="wp-content/plugins/football-pool/assets/libs/chosen/chosen.jquery.min.js"></script>-->
       <script src="wp-content/plugins/football-pool/assets/libs/colorbox/jquery.colorbox-min.js"></script>
   
       <script>
           var FootballPoolAjax = {"fp_recalc_nonce":"ed130dfe9a","colorbox_close":"sluiten","colorbox_html":"","error_message":"Er is iets foutgegaan bij het berekenen van de scores. Bekijk de <a href=\"?page=footballpool-help#ranking-calculation\">helppagina<\/a> voor informatie over hoe je het probleem kan achterhalen.","error_label":"Foutmelding","chosen_no_results_text":"Oeps, niets gevonden!"};
   
           var ajaxurl = 'wp-admin/admin-ajax.php';
           console.log(FootballPoolAdmin);
           FootballPoolAdmin["calculate"]();
       </script>
       ```
   
    -  This reply was modified 7 years, 11 months ago by [harmenzon](https://wordpress.org/support/users/harmenzon/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Automated recalulation of scores](https://wordpress.org/support/topic/automated-recalulation-of-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/automated-recalulation-of-scores/#post-10412584)
 * Thanks. Almost there I hope… I copied the FootballPoolAjax var from the source
   and got passed some initial errors. Now the following error shows. Any suggestions?
 *     ```
       admin.js:127 Uncaught TypeError: $.colorbox is not a function
           at Object.success (admin.js:127)
           at u (jquery.min.js:2)
           at Object.fireWith [as resolveWith] (jquery.min.js:2)
           at k (jquery.min.js:2)
           at XMLHttpRequest.<anonymous> (jquery.min.js:2)
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Automated recalulation of scores](https://wordpress.org/support/topic/automated-recalulation-of-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/automated-recalulation-of-scores/#post-10412442)
 * Understood. Then I would like to try the second approach, with the `calculate_score_history()`
   function. I created a html page and tried to call the function.
    If that would
   work, then I can call that html page from Python. But I seem to be missing some
   defines like `FootballPoolAjax` and `ajaxurl`. Hope you can help me out and thanks
   again for your time.
 *     ```
       <!DOCTYPE html>
       <html>
       <head>
           <meta charset="utf-8" />
           <meta http-equiv="X-UA-Compatible" content="IE=edge">
           <title>Page Title</title>
           <meta name="viewport" content="width=device-width, initial-scale=1">
       </head>
       <body>
           <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
   
           <script src="admin.js"></script>
   
           <script>
               console.log(FootballPoolAdmin);
               FootballPoolAdmin["calculate"]();
           </script>
       </body>
       </html>
       ```
   
    -  This reply was modified 7 years, 11 months ago by [harmenzon](https://wordpress.org/support/users/harmenzon/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Automated recalulation of scores](https://wordpress.org/support/topic/automated-recalulation-of-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/automated-recalulation-of-scores/#post-10410232)
 * Thanks for your support.
 * I do not believe it is the wp-cli that is causing this. For example if I use 
   the command `wp db check` than all seems to be fine. I would really like to use
   wp-cli. So maybe we can debug this together?
 * Below the outcome of the command `wp --info --debug`:
 *     ```
       Debug (bootstrap): No readable global config found (78.102s)
       Debug (bootstrap): No project config found (78.357s)
       Debug (bootstrap): argv: /usr/local/bin/wp --info --debug (78.415s)
       Debug (bootstrap): Running command: cli info (78.428s)
       OS:     Linux 3.2.40 #15284 Sat May 19 04:36:51 CST 2018 armv7l
       Shell:  /bin/sh
       PHP binary:     /usr/bin/php
       PHP version:    5.6.11
       php.ini used:   /etc/php/php.ini
       WP-CLI root dir:        phar://wp-cli.phar
       WP-CLI vendor dir:      phar://wp-cli.phar/vendor
       WP_CLI phar path:       /volume2/web/wordpress
       WP-CLI packages dir:
       WP-CLI global config:
       WP-CLI project config:
       WP-CLI version: 1.5.1
       ```
   
    -  This reply was modified 7 years, 11 months ago by [harmenzon](https://wordpress.org/support/users/harmenzon/).
    -  This reply was modified 7 years, 11 months ago by [harmenzon](https://wordpress.org/support/users/harmenzon/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Delete old scores](https://wordpress.org/support/topic/delete-old-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/delete-old-scores/#post-10359623)
 * Solved:
    [https://wordpress.org/support/topic/new-season/](https://wordpress.org/support/topic/new-season/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Football Pool] Recalculate Scores](https://wordpress.org/support/topic/recalculate-scores/)
 *  Thread Starter [harmenzon](https://wordpress.org/support/users/harmenzon/)
 * (@harmenzon)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/recalculate-scores/#post-5006665)
 * Thanks for your quick response.
    I had a look at the file, but it will take me
   a lot of time to understand the coding. I was hoping that I could somehow simulate
   the onclick button event ‘FootballPoolAdmin.calculate()’. Anyways, thanks again.
   I guess I just have to manually press the button evry morning. 🙂

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