Support

Home Forums Event Espresso Premium Fatal Error on site

Fatal Error on site

Posted: November 8, 2021 at 11:51 am

Viewing 8 reply threads


AckermanInstitute

November 8, 2021 at 11:51 am

Hi, we received an email saying a fatal error was caught on the website caused by Event Espresso. The website seems to be working, but we’ve received two of these notices so far.

Here are the error details:

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 5.8.1
Current theme: Astra Child (version 1.0.0)
Current plugin: Event Espresso (version 4.10.13.p)
PHP version 7.4.25

Error Details
=============
An error of type E_ERROR was caused in line 257 of the file /home/ackerman/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php. Error message: 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/ackerman/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php on line 243 and defined in /home/ackerman/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php:257
Stack trace:
#0 /home/ackerman/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/ackerman/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


Tony

  • Support Staff

November 9, 2021 at 4:58 am

Hi there,

We need to know ‘what’ is calling that function above to be able to troubleshoot this further, notice how the above content ends with ‘#2’, that would normally be followed by more details to give a full ‘stack trace’ and show what is calling the function.

If you check your server error logs (your host will usually have a section you can view those within your control panel) can you see the above error listed there?

If so can you add the full error log entry for it here?


AckermanInstitute

November 9, 2021 at 9:05 am

This is what I found in the server logs:
[09-Nov-2021 14:37:51 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/ackerman/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php on line 243 and defined in /home/ackerman/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php:257
Stack trace:
#0 /home/ackerman/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/ackerman/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/ackerman/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/custom_post_types/CustomPostTypeDefinitions.php on line 257


AckermanInstitute

November 9, 2021 at 10:35 am

Also, I’m not sure if this is related, but we are trying to make changes to this event: https://www.ackerman.org/events/racial-trauma/

When we go to save the changes for this page, we see this message in the browser, “There has been a critical error on this website. Please check your site admin email inbox for instructions.”


Tony

  • Support Staff

November 9, 2021 at 3:44 pm

Yeah, that will be related and means this is likely a conflict.

First, create a database backup of the site, just to be safe.

Lots of ways to do this, including via a plugin:

https://en-gb.wordpress.org/plugins/search/backup/

Then install the Health Check & Troubleshooting plugin:

https://wordpress.org/plugins/health-check/

Once thats has been installed and activated, go to Tools -> Site Health -> Troubleshooting. Enable Troubleshooting mode.

What that does is disable all plugins and switch you back to a default theme, but only for you (the logged-in admin) and not your visitors.

Now, in the admin bar go to Troubleshooting Mode -> Manage Active Plugins.

Active Event Espresso 4.

Edit the event you tried to previously, any errors this time?

If not, back in the Troubleshooting Mode admin menu, in Themes, set your ‘real’ theme to be active. Test again.

If still no error, activate each of your sites plugins and test making an update to the event between until you get the error again, then let me know which plugin you activated to get the error to throw.

(Once you’ve finished this testing go back to the Admin Bar, Troubleshooting Mode -> Disable Troubleshooting mode. Now you’ll be back to normal)


AckermanInstitute

November 10, 2021 at 8:47 am

It seems to be a conflict with Elementor. Once a disabled Elementor on Event pages, the error stopped occuring.


Tony

  • Support Staff

November 10, 2021 at 11:12 am

Hmm, strange, which version of Elementor are you using?

I’ve tested the latest standard version (3.4.7) without any issues but it could be a combination of Elementor plus another, or additional add-ons for Elementor if you have those?


AckermanInstitute

November 10, 2021 at 3:12 pm

Yes, it’s the latest version of Elementor, plus we’re using Ultimate Addons for Elementor. As far as I can tell, it is only the one event that is creating the error.


Tony

  • Support Staff

November 11, 2021 at 2:11 pm

unfortauntely, I can’t reproduce this to get a better idea of what is happening.

Can I take a look over the event and see if anything stands out there? If so you can send temp login details over using this form:

https://eventespresso.com/send-login-details/

I can add additional debugging on the site to see if that shows what the issue if preferred? Note that to do so I’ll need FTP credentials, if not just don’t submit those and I’ll see if anything else stands out.

Viewing 8 reply threads

The support post ‘Fatal Error on site’ 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