Not working
-
The prediction sheet is not working
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 to see the link]
-
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?
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.
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.
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->queryI’m wondering if it has something to do with the fact that I ran another pool on this website before.
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.
Please see the error log above. It seems similar to this issue https://www.ads-software.com/support/topic/results-not-saved/
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.
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
@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 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 );
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
The prediction page record only some scores, most of the time home score
please provide information from your error log.
[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 2 years, 4 months ago by
tonynrg89.
@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.
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.
Try to disable option “Use HTML5 number inputs”, worked for me ??
Disabling AJAX calls in wp-config.php works for me. Thank you!
-
This reply was modified 2 years, 4 months ago by
- The topic ‘Not working’ is closed to new replies.