Support

Home Forums Event Espresso Premium Uncaught TypeError when saving events

Uncaught TypeError when saving events

Posted: February 4, 2021 at 1:38 pm


Steve Wilder

February 4, 2021 at 1:38 pm

Hello! We are experiencing the below error when trying to save events. Can you assist? Thanks!

[04-Feb-2021 20:29:07 UTC] PHP Fatal error: Uncaught TypeError: Argument 2 passed to EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions::getCustomPostTypeModelName() must be of the type array, null given, called in /home/thedinne/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php on line 243 and defined in /home/thedinne/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php:257
Stack trace:
#0 /home/thedinne/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php(243): EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions->getCustomPostTypeModelName(false, NULL)
#1 /home/thedinne/public_html/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php(741): EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions->getCustomPostTypeModelNames(false)
#2 in /home/thedinne/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php on line 257


Tony

  • Support Staff

February 4, 2021 at 4:26 pm

Hi Steve,

Can you confirm you are using the latest version of Event Espresso? (Currently 4.10.10.p)

Which version of WP is the site currently running?


Steve Wilder

February 6, 2021 at 10:03 am

Current version for both EE4 (4.10.10.p) and WordPress (5.6.1)


Tony

  • Support Staff

February 8, 2021 at 8:22 am

Hmm, ok.

So from the error, it looks like the value of ‘post’ has been removed/unset on the request.

Does this happen on all events?

Can you create new events but then the above error is thrown when updating or is it thrown on both creating and updating?

Any new plugins you’ve recently installed?

The support post ‘Uncaught TypeError when saving events’ 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