WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] Start Date and End Date Wrong (35 posts)

  1. hintack315
    Member
    Posted 1 year ago #

    I have created multiple events with different starting and ending dates and times. Some events are for the whole weekend and some are a whole week. When I edit the event in the backend, the dates are correct as entered. However, the frontend shows the end date and time as the exact same thing as the starting date and time. This is not correct. How do I correct this?

    Example: Backend
    Frontend

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. jonahcoyote
    Member
    Posted 1 year ago #

    Hi hintack315,

    What version of the plugin are you running? Please make sure you are running the latest (2.0.11). Have you made any modifications to any of the plugin templates? If you did I would want to see a copy of list.php since the Frontend screenshot you took is of the list. Also, please try deactivating all other plugins as there could be a plugin conflict and we need to rule this out.

    Let me know how it goes.

    Thanks,
    Jonah

  3. hintack315
    Member
    Posted 1 year ago #

    Thank you for responding so quickly, Jonah.

    I'm running 2.0.11 and I have no other plugins installed or activated on my site. I haven't made any modifications to the plugin templates. I have the "Responsive" theme activated on my site, but I haven't made any modifications to things other than changing the color in the CSS.
    My list.php is here for viewing.

    My site is here in case you need to see more.

    Just to make sure, I activated the "Twenty Twelve" theme in WP and I still have the same problem, so I don't think it's something to do with the theme I'm using.

    Thanks!

  4. jonahcoyote
    Member
    Posted 1 year ago #

    Hi hintack315,

    Thanks for your reply. Ok, the template looks fine. Try changing your time zone setting to a UTC time instead of a city. If that doesn't work, try clearing your permalinks by going to Settings > Permalinks.

    Let me know how that goes.

    Thanks,
    Jonah

  5. hintack315
    Member
    Posted 1 year ago #

    Hi Jonah,

    I'm having no luck at all. Both options still cause the problem. I even backed up my site and tried a clean install for the heck of it and started from scratch, and that problem still exists this way too.

    I can give you admin access if you need to investigate further, but I have no clue what's going on. If need be, you can email me directly at hintack315 gmail <d o t> com.

    Thank you.

  6. jonahcoyote
    Member
    Posted 1 year ago #

    Hi hintack315,

    Strange. Yes if you would provide me access I can take a look. Please email access to pro [at] tri [dot] be, attn. to me and reference this thread. Do I have permission to deactivate plugins and change settings? I'll promise to put everything back the way it was.

    Thanks,
    Jonah

  7. jonahcoyote
    Member
    Posted 1 year ago #

    Hi hintack315,

    I couldn't figure anything out myself so I'm having a developer take a look at things. Stay tuned!

    - Jonah

  8. hintack315
    Member
    Posted 1 year ago #

    Hi Jonah,

    Okay, sounds good! Thanks for looking into it for me!

  9. jonahcoyote
    Member
    Posted 1 year ago #

    Hi hintack315,

    Sorry about the delay in getting back to you on this. I've still got the developers taking a look. What web hosting are you on?

    Thanks,
    Jonah

  10. hintack315
    Member
    Posted 1 year ago #

    Hi Jonah,

    No worries. I'm self-hosting this with Windows Server 2012 Standard x64 with Apache and of course MySQL and PHP.

  11. cebronix
    Member
    Posted 1 year ago #

    I'm having the exact same issue. But it works fine on my other site using the same plugins.

  12. jonahcoyote
    Member
    Posted 1 year ago #

    Hi cebronix,

    Are you saying you have the same issue running on the same or similar configuration as hintack315 but it works fine on another system?

    - Jonah

  13. cebronix
    Member
    Posted 1 year ago #

    Similar. My "End time / date" just doesn't show up outside of the new/edit event back end. I'm on a Mac OSX server with Apache, MySQL & PHP. But I have the same version 2.0.11 installed on a different server with the same setup but that one works fine.

    Not working
    Working

    Once the top one is working, the other one goes away. It was just for testing.
    Any ideas?

  14. jonahcoyote
    Member
    Posted 1 year ago #

    Hi cebronix,

    Have you tried deactivating all other plugins and/or reverting to the Twenty Eleven / Twelve theme to rule out a conflict there?

    - Jonah

  15. cebronix
    Member
    Posted 1 year ago #

    Yeah, I tried that this morning. First the theme, then all the plugins. Deactivated every one of them including Jetpack but it didn't help.
    I don't know if it's important, but the new site is a MultiSite/Network install.

  16. jaikdean
    Member
    Posted 1 year ago #

    I'm having exactly the same issue. A var_dump($post) shows the following values for the start and end dates:

    ["EventStartDate"]=> string(19) "2013-04-04 08:00:00"
    ["EventEndDate"]=> string(26) "2013-04-04 08:00:00.000000"

    However, the database has these as:

    _EventStartDate 2013-04-04 08:00:00
    _EventEndDate 2013-04-19 17:00:00
  17. jaikdean
    Member
    Posted 1 year ago #

    Looking at the plugin code, it appears to be doing various calculations and checks using a piece of postmeta with the key _EventDuration which I don't have in my database.

    Specifically, it looks like this piece of SQL may be the culprit:

    IFNULL(DATE_ADD(CAST(eventStart.meta_value AS DATETIME), INTERVAL eventDuration.meta_value SECOND), eventEnd.meta_value) as EventEndDate

    Replacing it with the following means I get the correct end date through, but I expect this will break things in other circumstances:

    eventEnd.meta_value as EventEndDate

    It looks like MySQL is treating the null value of eventDuration.meta_value as 0 for the purposes of the DATE_ADD() call. Perhaps this is specific to certain versions of MySQL and is why not everyone is getting the problem? I'm on MySQL 5.6.10.

  18. jonahcoyote
    Member
    Posted 1 year ago #

    Hi hintack315 pr cebronix,

    Would you be willing to provide us with a db dump so we can test out what you're working with? You can email to pro [at] tri [dot] be - please attn. to me and reference this thread so we know what it's for.

    Thanks,
    Jonah

  19. jaikdean
    Member
    Posted 1 year ago #

    This problem is definitely due to a change in MySQL 5.6 for us. It may well be a MySQL 5.6 bug, I'll be reporting it to them too.

    Assuming there is no post ID 99999, running the following query shows different results in <5.6 and 5.6…

    SELECT IFNULL(DATE_ADD(CAST(NOW() AS DATETIME), INTERVAL a.meta_value SECOND), 'duration is null') AS duration, a.meta_value
    FROM wp_postmeta m
    LEFT JOIN wp_postmeta a ON a.post_id = 99999
    LIMIT 0,1

    MySQL 5.5 result (which is expected by the Events Calendar code):
    duration: "duration is null"
    meta_value: NULL

    MySQL 5.6 result:
    duration: "2013-04-03 17:27:49.000000"
    meta_value: NULL

    Interestingly, if we just do the following query the results differ:

    SELECT IFNULL(DATE_ADD(CAST(NOW() AS DATETIME), INTERVAL null SECOND), 'duration is null') AS duration

    MySQL 5.5 result:
    duration: "duration is null"

    MySQL 5.6 result:
    duration: "duration is null"

  20. jonahcoyote
    Member
    Posted 1 year ago #

    Thanks for sharing that jaikdean!

  21. jaikdean
    Member
    Posted 1 year ago #

    My bug report on MySQL has now been verified.

  22. jonahcoyote
    Member
    Posted 1 year ago #

    Hey guys, since I haven't heard back from anyone on getting a DB dump for this, I'm going to have to close the ticket out. If anyone wants to provide a DB dump, please let me know in the next few days.

    Thanks,
    Jonah

  23. jonahcoyote
    Member
    Posted 1 year ago #

    Closing this out since I haven't heard back from anyone on this. Feel to re-open if need be.

    Cheers,
    Jonah

  24. heartbox
    Member
    Posted 1 year ago #

    Hello Jonah,

    I'm having the same problem as hintack315 but I really cannot find a way to fix this...
    Has anyone find a solution for this bug?

    Cheers

  25. jonahcoyote
    Member
    Posted 1 year ago #

    Hi heartbox,

    In order to look into this any further we need a DB dump to be able to test things out on our end. Can you provide us with that?

  26. jonahcoyote
    Member
    Posted 1 year ago #

    Hi all, can anyone having this problem please confirm what version of the plugin you are running? Ideally you should be on 2.0.11

    Thanks,
    Jonah

  27. cebronix
    Member
    Posted 1 year ago #

    Sorry, I've moved to a different plugin. But yes, it was 2.0.11

  28. jonahcoyote
    Member
    Posted 1 year ago #

    Thanks cebronix, anyone else still having this issue, can you tell me what version of the plugin you are running?

    - Jonah

  29. heartbox
    Member
    Posted 1 year ago #

    Hi Jonah,

    Sure I can send you a DB dump, I still have the problem.
    Please let me know where I have to send it to you

    Thanks a lot

    ps. running v 2.0.11

  30. jonahcoyote
    Member
    Posted 1 year ago #

    Hi heartbox,

    Please send it to pro [at] tri [dot] be and attn. to me and reference this thread so I know what it's about.

    Thanks,
    Jonah

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic