WordPress.org

Forums

Football Pool
[resolved] Unable to predict matches (15 posts)

  1. Martinooo
    Member
    Posted 1 year ago #

    Hi,

    It's not possible to predict matches for today and tomorrow.

    I did the Timezone Debug check and the matches are not locked yet.
    Match: (2) Mexico - Kameroen
    Match is locked: false
    Match was/will be locked at time (local): 2014-06-13 17:45

    Hope you can help me!

    https://wordpress.org/plugins/football-pool/

  2. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    Can you tell me more about why you are unable to predict the matches? Is there no input field? Or do you get an error?

    Have you tried setting the debug settings on in WordPress to see if there are errors logged?

  3. Martinooo
    Member
    Posted 1 year ago #

    Hi,

    Looks like it close to early. There are no input fields for the matches of today and you already can see what people predict. Also you can click on the statistics icon of those matches.

    If you need more info please let me know.

  4. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    Can you post the complete timezone debug info for a match?

  5. Martinooo
    Member
    Posted 1 year ago #

    Match: (9) Zwitserland - Ecuador
    Match date (database, should be UTC): 2014-06-15 16:00:00
    Match date (local): 2014-06-15 18:00
    Match timestamp (database, should be UTC): 1402848000
    Match is locked: false
    Match was/will be locked at time (local): 2014-06-15 17:45
    WordPress timezone offset: 2
    WordPress timezone string:
    WordPress current date (local): 2014-06-15 10:32:11
    WordPress current timestamp (local): 1402828331
    WordPress current date (UTC): 2014-06-15 08:32:11
    WordPress current timestamp (UTC): 1402821131
    Plugin prediction stop method matches: 0
    Plugin dynamic stop threshold (in seconds) for matches: 900
    Plugin prediction stop date for matches:
    Plugin prediction stop method questions: 1
    Plugin match time display setting: 0
    PHP current date and time (UTC): 2014-06-15 08:32
    PHP current timestamp (UTC, time()): 1402821131
    PHP current timestamp (UTC, date->format("U")): 1402821131
    PHP default timezone setting: UTC
    MySQL current date and time (UTC): 2014-06-15 08:32:11
    MySQL current timestamp (UTC): 1402821131
    MySQL current date and time (local): 2014-06-15 10:32:11
    MySQL global timezone setting: SYSTEM
    MySQL session timezone setting: SYSTEM

  6. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    Those settings look fine. If I can get temporary access to your WP install as an admin I can take a close look at the settings. You can email the details to my address that is at the bottom of the help page.

  7. sezercik
    Member
    Posted 1 year ago #

    Try empty cache of wordpress. I switched it off entirely since it gave problems with showing saved predictions as well.

  8. Martinooo
    Member
    Posted 1 year ago #

    @ AntoineH:
    Did you received login details?

    @ sezercik:
    How do I empty cache of wordpress? Don't have any cache folders.

  9. sezercik
    Member
    Posted 1 year ago #

    Install Super Cache plugin, empty the cache and turn caching off.

  10. Martinooo
    Member
    Posted 1 year ago #

    Hi sezercik,

    I installed WP Super Cache, but looks like it doesn't solve my problem. Maybe any other tips :-) ?

  11. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    Martinooo, I received two account mails for two different sites. Don't know which one is yours. Did you make a test account for user AntoineH?

  12. Martinooo
    Member
    Posted 1 year ago #

    Yes I created user AntoineH for you.

  13. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    I have absolutely no clue why, but your server time is 10hrs off when determining the timestamp for the current time.

    I did a quick fix for this in your code by subtracting 10hrs from the time() value:

    public function match_is_editable( $ts ) {
    	if ( $this->force_lock_time ) {
    		$editable = ( current_time( 'timestamp' ) < $this->lock );
    	} else {
    		$diff = $ts - ( time() - 10*60*60 ); // adjust 10hr earlier
    		$editable = ( $diff > $this->lock );
    	}
    
    	return $editable;
    }

    If, for some reason, future matches become unchangeable where they should be 'open', then you can alter this number.

    Please make sure you don't update the matches class file (or entire plugin) as it would break my change.

    You can delete my temp user.

  14. Martinooo
    Member
    Posted 1 year ago #

    Hi AntoineH,

    I think I found the problem. Probably my template causes the problem.
    Changed timezone UTC+2 to timezone (my country) in general settings.

    Where can I change your adjustment to check if the problem is solved with this change.

    Thanks for your help!

  15. Martinooo
    Member
    Posted 1 year ago #

    Hi AntoineH,

    I found your code and changed it to standard values. After that I changed timezone in general settings to timezone:(my country) instead of UTC+2 and problem is solved.
    Don't know the difference, probably something in my template.

    Thanks for your help!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Football Pool
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.