Support

Home Forums Event Espresso Premium Unable to create paid event

Unable to create paid event

Posted: December 21, 2019 at 6:13 pm

Viewing 8 reply threads


kwg

December 21, 2019 at 6:13 pm

I have an ongoing problem publishing a paid event. I run into the same error on free events, but can usually publish on the second or third attempt.

WordPress and EE are all currently up to date.

Attaching the auto generated WP logs:

WordPress version 5.3.2
Current theme: Ryan Pro (version 1.3.13)
Current plugin: Event Espresso (version 4.10.2.p)
PHP version 7.3.12

Error Details
=============
An error of type E_ERROR was caused in line 497 of the file /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php. Error message: Uncaught Error: Call to a member function start_date_and_time() on null in /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php:497
Stack trace:
#0 /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php(283): espresso_events_Pricing_Hooks->_update_tickets(Object(EE_Event), Array, Array)
#1 /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/admin_pages/events/Events_Admin_Page.core.php(1020): espresso_events_Pricing_Hooks->datetime_and_tickets_caf_update(Object(EE_Event), Array)
#2 /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php(1013): Events_Admin_Page->_insert_update_cpt_item(12749, Object(WP_Post))
#3 /home/knoxvill/public_html/wp-includes/class-wp-hook.php(288): EE_Admin_Page_CPT->insert_update(12749, Object(WP_Post), true)
#4 /home/knoxvill/public_html/wp-inc


Tony

  • Support Staff

December 23, 2019 at 4:09 am

Hi there,

The error you are getting usually happens when you’re hitting your server’s max_input_vars.

If you open up the event editor, then open Chrome DevTools on that page.

In the elements table do Ctrl+F and type out ‘input’ into the search field, like this – https://monosnap.com/file/Enugw6yRtnr1WMJu7HahANrTti7p20

How many inputs does it show on the page? (My screenshot shows 1 of 74, so I have roughly 74 inputs).

Alternatively, you can contact your how and have them increase the max_input_vars value from the default (which is 1000) to something like 3000 and try again, the problem with doing so is if something is adding a ton of inputs to the page (we’vee seen themes add 14 thousand inputs before now) the above may not help so its good to check how many you have.


kwg

December 23, 2019 at 5:03 am

Current input count is 397. Should I increase the max value?


Josh

  • Support Staff

December 23, 2019 at 5:50 am

Yes, it’s advised to increase the limit for max_input_vars. You may need to contact your web host and ask them if they can raise that limit.


Tony

  • Support Staff

December 23, 2019 at 7:09 am

If they’ve lowered the default value below 1000 then it will be causing the above, you can check in Event Espresso -> Maintenance -> System information

Search for max_input_vars and check the value there.

397 sounds low enough not to run into that to me but it does depend on your host.

Another possible cause for this is a theme/plugin conflict. The error above is basically saying there isn’t a valid datetime object to run functions on, the specific line number referenced above is after the datetimes have been saved, meaning there should be valid datetimes there. The above can happen if you’ve reached the max_input_vars limit or something interfered with the request.


kwg

December 23, 2019 at 3:24 pm

max_input_var limit is currently set to 1000. I have tested with the WP Troubleshooting tool and it occurs with only the EE plugin enabled.


Josh

  • Support Staff

December 26, 2019 at 6:56 am

You could check with your host to see if they can bump that limit to 2000.

Also, you could try temporarily switching to one of the default themes (like the twenty twenty theme).


kwg

December 29, 2019 at 8:02 pm

Bumped the limit to 2500, running the default theme, still having an issue.

Error Log as follows:

An error of type E_ERROR was caused in line 497 of the file /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php. Error message: Uncaught Error: Call to a member function start_date_and_time() on null in /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php:497
Stack trace:
#0 /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php(283): espresso_events_Pricing_Hooks->_update_tickets(Object(EE_Event), Array, Array)
#1 /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/admin_pages/events/Events_Admin_Page.core.php(1020): espresso_events_Pricing_Hooks->datetime_and_tickets_caf_update(Object(EE_Event), Array)
#2 /home/knoxvill/public_html/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php(1013): Events_Admin_Page->_insert_update_cpt_item(12830, Object(WP_Post))
#3 /home/knoxvill/public_html/wp-includes/class-wp-hook.php(288): EE_Admin_Page_CPT->insert_update(12830, Object(WP_Post), true)
#4 /home/knoxvill/public_html/wp-inc


Tony

  • Support Staff

December 30, 2019 at 5:34 am

Ok, so it doesn’t sound like max_input_vars is causing your issue.

I have tested with the WP Troubleshooting tool and it occurs with only the EE plugin enabled.

Hmm, strange.

Can you post the steps you took for this, please?

I just want to confirm you tested with only EE activated AND using a default theme such as twentyseventeen. It’s possible you have a conflict with both your theme and a plugin so testing with neither active would highlight this.

The reason I ask is the above error is almost exclusively a max_input_vars issue, the error you are getting is happening when EE is attempting to save the tickets on the event. It is trying to pull a value from a DateTime (which apparently it saved a little earlier without issue) for a ticket and getting no DateTime to pull the value from.

Is there any other error other than the above?

Have you modified EE at all? For example, do you have a custom functions plugin hooking into say FHEE__espresso_events_Pricing_Hooks___set_hooks_properties__date_format_strings to change the DateTime date format?

What is the date/time formate set within Dashboard -> Settings -> General?

How many ticket/datetimes do you have on this event?

The part of this that is really strange is:

I have an ongoing problem publishing a paid event. I run into the same error on free events, but can usually publish on the second or third attempt.

The fact that you can usually publish the event after updating X number of times is odd.

What type of hosting are you using? It is possible your running into a query limit when updating, although that’s is really just a shot in the dark.

Viewing 8 reply threads

The support post ‘Unable to create paid event’ 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