Subsequent Recurring Events are 7 hours later than actual time

Home Forums Calendar Products Events Calendar PRO Subsequent Recurring Events are 7 hours later than actual time

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #579158
    cfcpca
    Participant

    The first instance of recurring events are correct, but any subsequent events are exactly 7 hours later than the correct time.

    Additionally, when clicking on one of the subsequent events, it redirects to /all/ “Page Not Found”

    I’ve tried deactivating all other plugins, using the default WP themes, deleting events, creating new events, etc.

    #583796
    Brook
    Participant

    That is really strange! It is likely related to your server environment. Thought we have many users on WP Engine, so I am not sure what that could be yet.

    I suspect that you could require a permalink refresh. To do that could you do the following:
    1) Go to WP Admin > Settings > Permalinks (or [your site]/wp-admin/options-permalink.php)
    2) Click save.
    Did that fix it perchance?

    Would you mind alsograbbing your system information and pasting it here? Make sure to use the ‘Set as private reply’ checkbox to protect your private information from the public. You can find the system info by going to WP Admin > Events > Settings, clicking on the “Help” tab, and scrolling down to the ‘System Information’ box. (Or by going to [yoursite]/wp-admin/edit.php?post_type=tribe_events&page=tribe-events-calendar&tab=help) That will give me a lot of extra information to help diagnose the problem.

    Thanks for running through those debugging steps and posting the results like you did. Super helpful. Cheers!

    – Brook

    #597324
    cfcpca
    Participant

    This reply is private.

    #597677
    Brook
    Participant

    Thank you cfcpca!

    I have done some serious hunting and tried to recreate the problem. No dice. Fair warning, debugging this is not going to be easy but I shall do my utmost to make it as painless as possible.

    I want to be 100% sure that the install is solid. To do that could you please do the following steps. I apologize if they seem redundant, but each detail is rather important in guaranteeing that the install is up to snuff. Since you seem to most only have test events, hopefully you will not mind deleting them…

    1. Go to WP Admin > Installed Plugins, and deactivate all four Tribe Plugins if you have not already, then delete them.
    2. Download/install, and activate Event Rocket.
    3. Use Event Rocket’s Project Jettison to delete all Event settings and info.
    4. Deactivate all other plugins, including any WP Multi User/ Network ones that you can.
    5. Switch to the Twenty Thirteen theme.
    6. Download/Install and activate The Events Calendar, and Events Calendar PRO.
    7. Try flushing your permalinks once more. Only this time try changing the structure of your permalinks, and saving it. Go to the front end, confirm the structure was changed.
    8. Before activating anything else or doing pretty much anything, try creating a recurring event.

    What is the result of Step 8? Did that work properly this time? If not, can you try repeating Step 7? Did it work now? At this point you can change your permalinks back to your desired setting.

    If by Step 8 things are working excellent. Then it would be a good idea to try reactivating things one at a time, or perhaps a few at a time if you are feeling daring. In between each reactivation, test creating an even again. Does it work properly? If not, make a note of what you just activated/did.

    I apologize for the 8 step process. I just want to try everything I can think of and leave nothing to maybe. This issue is a bit puzzling, but those steps should help clarify things a lot. Let me know if you have questions. Cheers!

    – Brook

    #607272
    cfcpca
    Participant

    Ok I’ve followed the eight steps — the results are that the recurring event on step 8 turned out perfect. My next step was to reactivate the theme and create another recurring event. Unfortunately the issue was back on this event. 7 hours added to the recurring events and the link redirects to /all. What are our next steps?

    #616995
    Brook
    Participant

    Thank you so much for running through all of those steps. I can’t imagine it was fun. But, it was supremely helpful.

    If I had to guess the Savior theme you are running is tapping into WP Custom Post Types WP Queries, or possibly WP Timezone Options in a way that does not mix well with our recurring events. By far the best way to fix this is to get the theme author involved. We are in luck, the theme author guarantees compatibility with The Events Calendar. I think he would be very interested in diving into this and fixing it. The first step would likely be to report it to him, you might link to this thread and also include as much detail as you can about your site and the problem that way he can recreate it. We love Justin’s work around here. Anything we can do to help we will be glad to. Even if there is something we can change about the plugin to make it easier on theme authors like him we would certainly consider it. Such discussions are often done via our email, [email protected].

    If you want to dive in yourself you sure can. But, unless you are intimately familiar with the theme there is going to be a lot of stabbing in the dark. The initial stabs generally involve finding areas of the plugin that tap into the above WP APIs, and disabling or bypassing them then retesting.

    Please let me know if you have any more questions. Cheers!

    – Brook

    #641806
    kevincdaughtry
    Participant

    I just came across a similar issue and was able to track it down to a plugin I had installed that was using the php function date_default_timezone_set().

    Normally WordPress does everything in UTC and the Events Calendar Pro plugin works fine. But this other plugin was changing the default timezone to the one selected in my WP Settings (which was not UTC). Everything works fine for a single event because the date/time for the event is saved in the database and returned all in the default timezone, whatever that may be. When it comes to a recurring event the Events Calendar Pro plugin converts the date/time of the future events to a timestamp, which automatically converts to UTC and adjusts the time. The times then stay in UTC and are ouput as UTC as well, which causes the adjusted time. I was able to fix it by adding the follow code:

    // Fix for start date
    $this->start_date->setTimezone(new DateTimeZone(get_option(‘timezone_string’)));

    This goes in lib/tribeeventspro-recurrenceinstance.php inside the TribeEventsPro_RecurrenceInstance::__construct() method right after the line:
    $this->start_date = new DateTime(‘@’.$start_date);

    // Fix for end date
    $end_date->setTimezone(new DateTimeZone(get_option(‘timezone_string’)));

    This also goes in lib/tribeeventspro-recurrenceinstance.php inside the TribeEventsPro_RecurrenceInstance::save() method right after the line:
    $end_date = $this->get_end_date()

    I hope this helps!

    #651281
    cfcpca
    Participant

    We’re doing some testing with this ‘fix’. Thanks Kevin! I’ll update once we know for sure that it’s fixed it. If so, maybe a patch is in order, assuming it doesn’t mess anything else up?

    #651753
    kevincdaughtry
    Participant

    cfcpca, you may also test date_default_timezone_get() instead of setting the timezone to get_option(‘timezone_string’). In my case get_option(‘timezone_string’) worked but date_default_timezone_get() is probably more generic. But it does depend on if we are dealing with the same issue as well.

    I also posted here, and there has been some conversation of a patch:
    https://theeventscalendar.com/support/forums/topic/recurring-event-times-error/#post-651730

    #656718
    Brook
    Participant

    Thank you for posting Kevin! That is a big help.

    We are indeed discussing a change to our plugin that would render this issue moot. In truth, it does not seem like a good idea for any WP plugin or theme  to change those systemwide PHP settings from their defaults. Plugins which do those sorts of global changes tend to cause conflicts. But, on a very rare occasion it can be necessary so perhaps the theme dev was forced into it.

    We of course want our plugin to be as compatible as possible. Sometimes that involves reinventing a wheel, so that when someone modifies the original wheel we do not get unexpected results. I am not sure yet what the devs and such will decide. But, the possibility of us being able to fix this does exist.

    Please let us know if that fix worked cfcpa. Cheers!

    – Brook

    #659168
    cfcpca
    Participant

    Kevin and Brook
    It seems like that fix is working out for us. Thanks so much!!

    #671397
    Brook
    Participant

    That is exciting. Kevin you are awesome!

    – Brook

    #769005
    Leah
    Member

    Hi there,

    Thanks for bringing this issue to our attention. We weren’t able to get to it for our upcoming 3.8 release, but it is still very much on the radar. We hope to have it fixed in an upcoming release, and we will do our best to keep you posted on our progress. Thanks for your patience and support!

    Best,
    Leah
    and the team at Modern Tribe

    #909455
    Leah
    Member

    Hello,

    I just wanted to update you here and let you know that we have a fix for the issue you reported in our upcoming release. Thank you for bringing it to our attention! Keep an eye out for an update coming soon. If you are still experiencing issues after the update, please start a new thread and we’d be happy to look into it. Thank you for your patience and support while we got this corrected.

    Best,
    Leah

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Subsequent Recurring Events are 7 hours later than actual time’ is closed to new replies.