Home › Forums › Ticket Products › Event Tickets Plus › Bug: Ticket end date not saved
- This topic has 7 replies, 4 voices, and was last updated 8 years, 3 months ago by Support Droid.
-
AuthorPosts
-
December 7, 2015 at 9:06 am #1036976ThomasParticipant
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.
December 8, 2015 at 7:04 am #1037617NicoMemberHowdy 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,
NicoDecember 8, 2015 at 8:38 am #1037690KrisParticipantJust 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.
December 8, 2015 at 6:19 pm #1037910NicoMemberHey 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,
NicoDecember 9, 2015 at 5:33 am #1038052ThomasParticipantHi 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.
December 10, 2015 at 11:17 am #1039027NicoMemberHey 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,
NicoDecember 17, 2015 at 10:02 am #1043034NicoMemberHey 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,
NicoFebruary 18, 2016 at 8:33 am #1076280Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘Bug: Ticket end date not saved’ is closed to new replies.