Support

Home Forums Event Espresso Premium Unable to book reservation the day of

Unable to book reservation the day of

Posted: February 3, 2021 at 2:39 pm


Darlene Drouin

February 3, 2021 at 2:39 pm

The client is having problems taking reservations the day of an event This red warning appears, despite the event not having started yet and registration still being open.

Attention

We’re sorry. Either an error occurred or the event(s) you were attempting to register for may no longer be open for registration.

This appears inconsistently, as i was able to create new events with reservations showing the day of, and they worked as expected, reopening a closed event shows the error and no form, although in one instance despite showing the warning, for form appeared and i was able to make a reservation. Duplicating the closed event allowed for the new event to be reserved, but not the old event despite both showing the same times for registration and event.


Tony

  • Support Staff

February 4, 2021 at 6:26 am

Hi there,

The error mentioned happens when the add to cart link is generated and Event Espresso compares the current time with the registration start and end times, if the current time is before reg_start or after reg_end (and the event status is not ongoing) the link generates that error. The odd part is the duplication working and allow the dupe event to work.

Can you create a test event active today so I can take a look?


Darlene Drouin

February 4, 2021 at 9:16 am

I’ve created a test event here https://eccdc.org/workshop-register/?ee=904 but there is no error. Every event i have set up from scratch seemed to work as expected,the only time i was able to recreate the error was when the client sent me a specific event she had it on (she has had this happen on more than one occasion though, with screenshots) – that’s when i found that the duplicated copy worked while the original still showed the error despite all event and reg times being the same. That specific event has closed now though.

I noticed this today though, might have something to do with it –
In my general wordpress setting these are the times displayed currently – Universal time is 2021-02-04 16:14:06. Local time is 2021-02-04 11:14:06. (11:14 is the correct time here)

In event espresso general settings the time is showing as Current Time: February 4, 2021 4:12 PM, however the current time displayed on the actual event setup page is displaying as Current Time : February 4, 2021 11:07 AM


Tony

  • Support Staff

February 4, 2021 at 2:21 pm

In the above event, add the [ESPRESSO_CART_LINK] link shortcode into the description, the above error only shows for that specific output.

Do you have access to the database? phpMyAdmin or similar?

Comparing the data in the _events_details table for a ‘broken’ event and the duplicate might shed some light on what is going on.

What timezone do you have set in Dashboard -> Settings -> General?


Darlene Drouin

February 8, 2021 at 9:09 am

Will putting that shortcode in stop the error and allow people to book? Our timezone is set to Toronto in general settings, which is the correct timezone for both the client and us.

I had a look in phpmyadmin to compare my duplicated event and the original that was throwing errors, and the only differences i could see being name and description (changed to test while testing), wp_user as the original event was made by the client and the second by our account, and registration end time is 5pm on the original and 6pm on the copy because i had been playing around with some settings while testing after the second showed itself to work normally. Registration and event dates are all correct and the same. I can provide screenshots if needed


Tony

  • Support Staff

February 8, 2021 at 1:58 pm

Will putting that shortcode in stop the error and allow people to book?

No, the error is actually from the shortcode.

The test event you set up uses the Registration form on the event details but the other events on the site use the above shortcode to add a ‘Add to cart’ link, for example:

https://eccdc.org/workshop-register/?ee=877

So I can’t check for the error on your test event as it’s not using the same setup.

Our timezone is set to Toronto in general settings, which is the correct timezone for both the client and us.

So the fact that the time is showing incorrectly on the event editor is normally a good indication that something on the site is chasing the servers timezone, usually using date_default_time_set()

Any new plugins installed recently?

One thing to try is to edit \event-espresso\includes\functions\cart.php

Around like 1093 you should have something like:

if ( $event->is_active != "Y" || time() < $reg_start || ( time() > $reg_end && $event->event_status != 'O' ) || ! in_array( $event->event_status, array( 'A', 'O', 'S' )) ) {

Change that to:

if ( $event->is_active != "Y" || current_time('timestamp') < $reg_start || ( current_time('timestamp') > $reg_end && $event->event_status != 'O' ) || ! in_array( $event->event_status, array( 'A', 'O', 'S' )) ) {

Then see if you get any more reports of this, I can’t reproduce when testing on my sites currently.


Darlene Drouin

February 9, 2021 at 9:14 am

Ok I will try changing that, thank you I appreciate the help.

The support post ‘Unable to book reservation the day of’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso