V3: Possible bug with end date

Home Forums Calendar Products Events Calendar PRO V3: Possible bug with end date

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #53256
    Grégory
    Participant

    Hi, I’m Greg.

    Issue: the end date of an event is registered but the single view display the current date/hour.
    Editing an event, the dates are ok: https://www.dropbox.com/s/yr4gq5o78rhyvgf/Screenshot%202013-07-04%2017.45.41.png

    In the front-end single view, the end date is the current time (in French): https://www.dropbox.com/s/2msnwqmmzn65hlp/Screenshot%202013-07-04%2017.47.10.png

    Digging further:
    Use something like print_r($event); in public/template-tags/date.php: L70 (method tribe_get_end_date)
    Go to the single view, the object is printed 8 times.
    For the 2 first ones we have this: https://www.dropbox.com/s/7ir4lu85pqvo467/Screenshot%202013-07-04%2017.54.04.png The EventEndDate field is empty (I don’t know if it’s the normal behavior, but it does not feel right to me).
    For the 6 other ones we have this: https://www.dropbox.com/s/oak6mbtgjlipang/Screenshot%202013-07-04%2017.56.33.png The EventEndDate field contains the good date, but “strtotimed”. I think this is the problem, because in this method we have a strtotime() 5 lines later, so the field should contain ‘2013-07-24 12:00:00’ or be empty.
    At the line 72 there’s $event->EventEndDate = tribe_get_event_meta( $event->ID, ‘_EventEndDate’, true );
    If I force this, by removing the “if” test, the value is well formed and the good date is displayed (some print_r() still show the “readable” format though).

    I hope this will help to find the culprit 😉 and… Happy Independence Day!
    Greg

    #53280
    Jonah
    Participant

    Hi Greg,

    Thanks for troubleshooting this and sorry to hear about the troubles. First, can you be a little more specific about the files for the lines of code you are referencing? It’s not clear to me which file you are referencing. Second, I wonder, do you have any template overrides in an ‘events’ or ‘tribe-events’ folder with modifications? Or, have you made any modification to template files anywhere else that could have anything else to do with this? Third, is this happening with all events or only some events? I’m wondering if you can consistently reproduce it with a specific event configuration.

    Thanks,
    Jonah

    #53288
    Grégory
    Participant

    Hi Jonah,

    Thanks for your answer.
    No problem, major updates come with some bugs, as a developer myself I totally understand.

    To be more specific:
    File: /wp-content/plugins/the-events-calendar/public/template-tags/date.php
    Method: tribe_get_end_date() (starting at line 60)
    Tested with and without the PRO version.
    Tested with and without other plugins activated.
    Tested with my homemade theme and TwentyTwelve.
    No template overrides, no other “event” Custom Post Type, no modifications to existing templates.
    My print_r() test was at line 70, right before this “if” statement:
    if( empty($event->EventEndDate) )
    In short, the plugin is a fresh installation and I’m in the “discovery phase” (first time I use it), so the only modification I made was this test, after discovering the bug.

    So far, I created only 1 event. I’ll try with a dozen and come back for my feedback.

    Thanks.
    Greg

    #53316
    Grégory
    Participant

    OK, some news.
    It seems this one is more vicious than I thought.

    Steps I followed:
    – The basic version only is activated, not the PRO.
    – Create a new event (2013-07-15 09:00am to 2013-07-15 11:00am) and save. Look the dates, it’s good.
    – Go to the front-end single view: the end date is the current day+time. Printing the post object will show what I mentioned earlier: the EventEndDate field is empty, or filled with “July, 15th 2013 11h00min” (should be “2013-07-15 11:00:00”). As a result, the current date is displayed in the page (“July, 15th 2013 11h00min” can’t be passed through strtotime() a second time, it will return false).
    – Go back to the event edition, change the end hour to 01:00pm, save.
    – Go back to the front-end single view. The current date is still displayed, and the EventEndDate field is now empty or filled with “July, 15th 2013 13h00min”. OK, this the good hour, but still the wrong format.
    – Activate the PRO version.
    – Go back to the front-end single view. Nothing new, the end date is today and the EventEndDate value hasn’t changed.
    – Go back editing the previous event. Save (no change, still 2013-07-15 01:00pm).
    – Go back to the front-end single view. Now it’s good! EventEndDate contains “2013-07-15 13:00:00” everywhere and display the good date in the page \o/

    Conclusion:
    The end date seems to be correctly saved (somewhere) with the basic version because when you edit an event, you can see it, this date is good. But, I think a step is missing because if we save this event with the PRO version, it’s all right.

    Good luck with this ^^

    #54046
    Jonah
    Participant

    Hi screenfeed,

    Thanks for all the info here. We’ve got a ticket out to get this fixed in our next release which will be coming out soon!

    Regards,
    Jonah

    #54049
    Grégory
    Participant

    Thank you Jonah (in my case it’s not a problem, since I use the PRO version).

    Greg

    #60471
    Rob
    Member

    Closing this one. Thanks all!

    #980120
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘V3: Possible bug with end date’ is closed to new replies.