Bug: Ticket end date not saved

Home Forums Ticket Products Event Tickets Plus Bug: Ticket end date not saved

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1036976
    Thomas
    Participant

    We are using Event Calendar Pro and Event Tickets Plus (most up to date versions of WP, WC, TECP…). This bug existed in WooTickets already.

    When creating a new event and the corresponding tickets the ticket_end_date (when to stop selling tickets) will not be saved when pressing the Save button.
    Instead it will be reset to 1970-01-01.

    This leads to a situation where every Author wonders why one can not buy tickets for the event. Obviously it is because the ticket_end_date has already been reached.

    #1037617
    Nico
    Member

    Howdy Thomas,

    Welcome to our support forums and thanks for reaching out to us. Sorry to hear about this issue your experiencing.

    Let’s start by trouble shooting this so we can see if this is a problem in our plugin or a conflict with the theme or other installed plugins. Can you please follow the steps described in our Testing for conflicts guide? I see you mark as this was tested, just want to make sure.

    In case you are seeing this bug with default conditions, Can you send me over detailed steps to reproduce this? It would be great if you can include a screenshot of the ticket settings and also indicate what date/time format your site is using.

    Please let me know about it,
    Best,
    Nico

    #1037690
    Kris
    Participant

    Just wanted to add…i’ve had this issue for quite some time on our site and the only way i could resolve it was to do a fresh install of wordpress and import pages, event etc and NOT do a direct copy of the database. This is the only way I could get the am/pm to stay selected was to take this route. Hope this helps in solving the issue.

    #1037910
    Nico
    Member

    Hey kris,

    Thanks for reaching out! We’ve heard reports of the AM/PM part of the date not getting correctly saved, and a fix for this is already being developed. It won’t make t to the maintenance release as it’s still under development right now, but hope it get’s fixed soon.

    @ Thomas, is this you case as well (the AM/PM part of the date not being saved and generating the weird date) ?

    Please let me know about this,
    Best,
    Nico

    #1038052
    Thomas
    Participant

    Hi Nico, hi Kris,

    thanks for the replies! Since this seemed to be a long lasting nasty problem I debugged it myself. Outcome:

    My WordPress allows two different – non AM/PM – time formats: “G:i” and “H:i”

    When “G:i” is used the /event-tickets/src/admin-views/meta-box.php in line 127 and 152 will show the AM/PM selector even though it’s not necessary. (The function there tests only on “H” instead of “H” and “G”)

    Due to this bug the “ticket_start_meridian” and “ticket_ned_meridian” will be returned by the ajax function when the ticket is saved.

    Due to the presence of those meridians it will be attached to the date in event-tickets/src/Tribe/tickets.php in line 372 and 377.

    This results in a wrong date string (e.g. “2016-12-15 14:05:00 pm”) which makes “strtotime” return FALSE for every time >= 13:00. FALSE means 0 for timestamp in the date function and returns 1970…. (lines 373/378)

    So, long story short:
    Easiest would be to add the check on “G” in the admin-view as described above.

    For all the others with this problem: Temporarily switch your wordpress time format to “H:i”. Afterwards you should not see the “PM/AM” in the ticket creation process anymore.

    #1039027
    Nico
    Member

    Hey Thomas,

    Thanks a lot for the troubleshooting on this issue! Great conclusions in there 🙂

    I’ve added your notes to the bug report, and also bumped priority on the issue as his could potentially affect a lot of you folks!

    For all the others with this problem: Temporarily switch your wordpress time format to “H:i”. Afterwards you should not see the “PM/AM” in the ticket creation process anymore.

    Unfortunately this seems to be the way to go for now. I’m sory there’s not much I can do till the fix for this is released.

    Thanks for the patience while we sort this issue,
    Best,
    Nico

    #1043034
    Nico
    Member

    Hey Folks,

    Good news 🙂 Maintenance release 4.0.2 is here with a fix for this issue. You can read the details here!

    Please update the plugins and let me know if this is working as expected!

    Cheers,
    Nico

    #1076280
    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 ‘Bug: Ticket end date not saved’ is closed to new replies.