End date field is showing start date

Home Forums Calendar Products Events Calendar PRO End date field is showing start date

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #43577
    David
    Participant

    On some server environments, we’re seeing the start date being loaded as the end date. There is a thread on this here: http://wordpress.org/support/topic/start-date-and-end-date-wrong?replies=17

    My investigations have revealed the following…

    Looking at the 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.

    #43703
    Jonah
    Participant

    Hi David,

    Thanks for this. That other thread you referenced is still on open ticket we are taking a look at. As soon as I know more, I will post back here.

    Thanks,
    Jonah

    #47580
    Jonah
    Participant

    Hi David,

    Are you still having this issue? Would you be willing to provide us with a DB dump so we can see if it’s something specific there? You can post a link to it privately here. Also, what type of server are you running on and what version of PHP are you on?

    Thanks,
    Jonah

    #47671
    Jonah
    Participant

    Hi David,

    You should definitely have “_EventDuration” in your DB upon installation of our plugins. What versions are you running?

    #47956
    Jonah
    Participant

    David?

    #48510
    Jonah
    Participant

    Hi David,

    Since we haven’t heard back from you in some time, I’m closing this thread out. Please feel free to open a new thread and reference this one if you are still having issues.

    Thanks,
    Jonah

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘End date field is showing start date’ is closed to new replies.