Title: Not working
Last modified: November 15, 2022

---

# Not working

 *  Resolved [tumateix](https://wordpress.org/support/users/tumateix/)
 * (@tumateix)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/)
 * The prediction sheet is not working
 * [https://www.tumateix.com/pruebas/pool/](https://www.tumateix.com/pruebas/pool/)
 * even if you registered there is no way to put your predictions
 * What can be done?
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fnot-working-3992%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16199013)
 * Can you tell me what it is that is not working? Do you get any errors? Either
   in your error log or in the browser console?
 *  [mkrakowiak](https://wordpress.org/support/users/mkrakowiak/)
 * (@mkrakowiak)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16201308)
 * Hi Antoine. I’m experiencing the same thing. One of my pool participants has 
   reported the issue to me. See here [https://share.getcloudapp.com/2Nu6dQkn](https://share.getcloudapp.com/2Nu6dQkn).
 * I tried clearing the cache (Nginx and Redis Object cache) and deactivating plugins
   like Perfmatters, antispam etc. I also switched to asynchronous saving to see
   if that would help. And the page worked ok longer, but after setting up the 6th
   or 7th score, the message “Something went wrong while saving the prediction” 
   popped up. I’m happy to give you access to my site’s backend if you’re available
   to take a look.
 * Thanks for your help figuring it out.
 *  [mkrakowiak](https://wordpress.org/support/users/mkrakowiak/)
 * (@mkrakowiak)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16201403)
 * OK, I ran WP Debug and here are the errors registered:
 * [15-Nov-2022 17:25:36 UTC] WordPress database error Duplicate entry ‘2-15’ for
   key ‘pool_wp_predictions.PRIMARY’ for query INSERT INTO pool_wp_predictions (
   user_id, match_id, home_score, away_score, has_joker )
    VALUES ( 2, 15, NULL,
   1, 0 ) made by do_action(‘wp_ajax_footballpool_update_team_prediction’), WP_Hook-
   >do_action, WP_Hook->apply_filters, Football_Pool_Pool::update_prediction, QM_DB-
   >query [15-Nov-2022 17:25:47 UTC] WordPress database error Duplicate entry ‘2-
   16’ for key ‘pool_wp_predictions.PRIMARY’ for query INSERT INTO pool_wp_predictions(
   user_id, match_id, home_score, away_score, has_joker ) VALUES ( 2, 16, NULL, 
   0, 0 ) made by do_action(‘wp_ajax_footballpool_update_team_prediction’), WP_Hook-
   >do_action, WP_Hook->apply_filters, Football_Pool_Pool::update_prediction, QM_DB-
   >query [15-Nov-2022 17:25:48 UTC] WordPress database error Duplicate entry ‘2-
   16’ for key ‘pool_wp_predictions.PRIMARY’ for query INSERT INTO pool_wp_predictions(
   user_id, match_id, home_score, away_score, has_joker ) VALUES ( 2, 16, NULL, 
   1, 0 ) made by do_action(‘wp_ajax_footballpool_update_team_prediction’), WP_Hook-
   >do_action, WP_Hook->apply_filters, Football_Pool_Pool::update_prediction, QM_DB-
   >query
 * I’m wondering if it has something to do with the fact that I ran another pool
   on this website before.
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16201412)
 * > One of my pool participants has reported the issue to me
 *  If it is only one participant, then it can’t be a database problem. Probably
   they have left the page open for too long? Did they try refreshing the page?
 * If you also experience the same, then you can do the same as I said above: check
   the error log.
 *  [mkrakowiak](https://wordpress.org/support/users/mkrakowiak/)
 * (@mkrakowiak)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16201425)
 * Please see the error log above. It seems similar to this issue [https://wordpress.org/support/topic/results-not-saved/](https://wordpress.org/support/topic/results-not-saved/)
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16201781)
 * Ah sorry, I missed the error log.
 * These duplicate entry seem cache related. I use WP’s object cache to store results
   for ‘expensive’ queries and before saving a prediction I check if I need to insert
   a new record or update an existing one. If somehow the cache is not cleared, 
   then the code thinks that there is not a record, while there is one.
 * If possible, try to deactivate caching entirely or only for my plugin.
 *  [tonynrg89](https://wordpress.org/support/users/tonynrg89/)
 * (@tonynrg89)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16202523)
 * Same problem here. I ran a pool some months ago and now it is impossible to put
   predictions, they disappear in few seconds showing: “Something went wrong while
   saving the prediction.”
 * Am I doing something wrong? XD
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16203194)
 * [@tonynrg89](https://wordpress.org/support/users/tonynrg89/) Although the problem
   might seem the same, the root cause can be totally different. Without extra information
   it’s really difficult to help you (basically, I’m just guessing).
 * **For everyone**: here’s a couple of things you can try.
 * **If you don’t have any predictions yet and it’s not a problem to start with 
   a clean install**
    Disable the plugin with the “keep data on uninstall” option
   disabled. Then reactivate again.
 * **If you want/have to keep your data**
    Run this [sql script](https://www.dropbox.com/s/i122c8z83nmk0nq/sql-2.10.0.txt?dl=0)
   via e.g. phpmyadmin on your database. If you have a non-default database prefix,
   first do a search & replace in the script on the “pool_wp_” string to match your
   table names.
 * **If that does not resolve it**
    Disable caching (plugins), or exclude my plugin
   from it.
 * Or try working without front-end AJAX calls by adding the following to your wp-
   config:
    `define( 'FOOTBALLPOOL_FRONTEND_AJAX', false );`
 *  [tonynrg89](https://wordpress.org/support/users/tonynrg89/)
 * (@tonynrg89)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16205119)
 * Thank you for your time,
    I installed the plugin on the main site…
 * Tried solutions 2 and 3 but nothing happens.
 * The prediction page record only some scores, most of the time home score
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16205169)
 * > The prediction page record only some scores, most of the time home score
 * please provide information from your error log.
 *  [tonynrg89](https://wordpress.org/support/users/tonynrg89/)
 * (@tonynrg89)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16205286)
 * [16-Nov-2022 15:32:45 UTC] PHP Notice: Constant FOOTBALLPOOL_FRONTEND_AJAX already
   defined in /web/htdocs/www.bivonabeach.org/home/wp-config.php on line 117
    [16-
   Nov-2022 15:32:46 UTC] WordPress database error Duplicate entry ’61-5′ for key‘
   PRIMARY’ for query INSERT INTO pool_wp13_predictions ( user_id, match_id, home_score,
   away_score, has_joker ) VALUES ( 61, 5, NULL, 2, 0 ) made by do_action(‘wp_ajax_footballpool_update_team_prediction’),
   WP_Hook->do_action, WP_Hook->apply_filters, Football_Pool_Pool::update_prediction,
   W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, 
   W3TC\_CallUnderlying->query, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection-
   >query, W3TC\DbCache_WpdbNew->default_query [16-Nov-2022 15:32:46 UTC] PHP Notice:
   Constant FOOTBALLPOOL_FRONTEND_AJAX already defined in /web/htdocs/www.bivonabeach.
   org/home/wp-config.php on line 117
    -  This reply was modified 3 years, 6 months ago by [tonynrg89](https://wordpress.org/support/users/tonynrg89/).
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16205583)
 * [@tonynrg89](https://wordpress.org/support/users/tonynrg89/) you have the constant`
   FOOTBALLPOOL_FRONTEND_AJAX` defined twice. Please remove one line to make sure
   you have the correct value.
 * From the log I notice 2 things: one is that you are still using AJAX saves. So,
   the constant is not set correctly to false. Possibly due to the double lines 
   in your config.
 * And when using AJAX saves, you get the duplicate keys error. This is indeed caching
   related. If you don’t know how to set up the caching to exclude my plugin, then
   I guess disabling AJAX saves is the only option for you.
 * Hope this helps.
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16206442)
 * I’ve done some testing with W3 Total Cache and if you disable the object cache,
   then it should work. Also with AJAX saves.
 * I will make some changes in the next plugin upgrade (v2.10.4) to avoid having
   to disable the entire persistent object cache.
 *  [bergjes](https://wordpress.org/support/users/bergjes/)
 * (@bergjes)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/#post-16209695)
 * Try to disable option “Use HTML5 number inputs”, worked for me 🙂
 *  [mkrakowiak](https://wordpress.org/support/users/mkrakowiak/)
 * (@mkrakowiak)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/page/2/#post-16210730)
 * Disabling AJAX calls in wp-config.php works for me. Thank you!

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

The topic ‘Not working’ is closed to new replies.

 * ![](https://ps.w.org/football-pool/assets/icon-256x256.png?rev=983880)
 * [Football Pool](https://wordpress.org/plugins/football-pool/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/football-pool/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/football-pool/)
 * [Active Topics](https://wordpress.org/support/plugin/football-pool/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/football-pool/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/football-pool/reviews/)

## Tags

 * [not working](https://wordpress.org/support/topic-tag/not-working/)

 * 16 replies
 * 5 participants
 * Last reply from: [mkrakowiak](https://wordpress.org/support/users/mkrakowiak/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/not-working-3992/page/2/#post-16210730)
 * Status: resolved