Support

Home Forums Event Espresso Premium Fatal Error in Event Espresso Core

Fatal Error in Event Espresso Core

Posted: August 8, 2023 at 3:19 am

Viewing 18 reply threads


combiwel

August 8, 2023 at 3:19 am

Hello,

I get an on one of my websites when going to event espresso. On every page I get the following fatal error:
Fatal error: Uncaught Exception: Page route "_your_organization_settings" with the supplied arguments () threw the following exception: Argument 1 passed to EED_Add_New_State::state_options() must be of the type array, null given, called in /home/1034895.cloudwaysapps.com/sbgrbwyhru/public_html/wp-includes/class-wp-hook.php on line 310

There was a topic


combiwel

August 8, 2023 at 3:23 am

More information:
There was another topic that had the same problem: https://eventespresso.com/topic/wordpress-caught-an-error-with-one-of-my-plugins-event-espresso/

the answer here was to update to 5.0.7 but my error happend on version 5.0.7 and updating to 5.0.8 did not resolve the issue.

Here is an image of the stack trace of the error:
https://s.inesta.nl/v/4Ab2R9vO6piBDGEZsDDLLaCnK


combiwel

August 8, 2023 at 3:48 am

This reply has been marked as private.


combiwel

August 8, 2023 at 3:51 am

This reply has been marked as private.


Tony

  • Support Staff

August 8, 2023 at 4:20 am

Hi there,

There was another topic that had the same problem: https://eventespresso.com/topic/wordpress-caught-an-error-with-one-of-my-plugins-event-espresso/

That’s not the same error, that’s a fatal from a config but yours is from adding states.

the answer here was to update to 5.0.7 but my error happend on version 5.0.7 and updating to 5.0.8 did not resolve the issue.

You got this in 5.0.7?

Did you change anything within Event Espresso to trigger the error?

We also made a new environment…

Thank you. That’s a different issue which we are currently investigating.


combiwel

August 8, 2023 at 4:25 am

We did not change anything in Event Espresso. Even when turning all plugin off and only activating event espresso core wee keep getting the error. We got the error in 5.0.7 and after updating to 5.0.8 we still get the same error.


Tony

  • Support Staff

August 8, 2023 at 4:45 am

Do you have FTP access to the site and are you comfortable editing PHP files?

I can give you a patch to get the site up and running whilst we get an update pushed out for this.

event-espresso-core-reg\core\libraries\form_sections\inputs\EE_State_Select_Input.php

Around line 103 you’ll find:

return $state_options;

Change that to:

return $state_options ?? [];

That should fix that first error.

The second error we are currently investigating.


combiwel

August 8, 2023 at 4:59 am

Thank you that works and we can now get into the general settings. But when going to the event overview. We then get:

Fatal error: Uncaught Exception: Page route “_events_overview_list_table” with the supplied arguments () threw the following exception: Typed property EE_Model_Relation_Base::$_timezone must be string, null used
in /home/1034895.cloudwaysapps.com/agcnptpbsc/public_html/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php on line 1156

Call stack:

EE_Admin_Page::_route_admin_request()
wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php:1102
EE_Admin_Page_CPT::route_admin_request()
wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_Init.core.php:258
EE_Admin_Page_Init::initialize_admin_page()
wp-includes/class-wp-hook.php:308
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:332
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-admin/admin.php:259

that second error. Do you have a fast solution for that as well? It will now only show one event.


Tony

  • Support Staff

August 8, 2023 at 5:29 am

I can’t reproduce that so need to find out what is causing it.

\event-espresso-core-reg\core\db_models\relations\EE_Model_Relation_Base.php

Line 39, change it from:

protected string $_timezone = '';

To be:

protected ?string $_timezone = '';


combiwel

August 8, 2023 at 5:34 am

I fixed the second error by going back to version 5.0.0 the error came from the file
event-espresso-core-reg\core\db_models\relations\EE_Model_Relation_Base.php

where in the 5.0.0 version the timezone string is defined like:

    /**
     * this is typically used when calling the relation models to make sure they inherit any set timezone from the
     * initiating model.
     *
     * @var string
     */
    protected $_timezone;

and in 5.0.7 and 5.0.8 the timezone string is defined like:

/**
     * this is typically used when calling the relation models to make sure they inherit any set timezone from the
     * initiating model.
     *
     * @var string
     */
    protected string $_timezone = '';

giving the error that timezone is null


Tony

  • Support Staff

August 8, 2023 at 5:38 am

I fixed the second error by going back to version 5.0.0

Switch to 5.0.7, I do not recommend staying on 5.0.0

the error came from the file…

Yeah, I know the line that is throwing the error 🙂

The problem is I don’t see anywhere setting up a relation and passing the timezone as null.

From the errors reported so far it looks like somewhere within the message system, but where… I can’t find yet.


combiwel

August 8, 2023 at 6:01 am

Will these errors be fixed with the new release?


Tony

  • Support Staff

August 8, 2023 at 6:12 am

I can’t say for sure yet, I need to be able to reproduce this and without knowing the cause I cant say.


combiwel

August 8, 2023 at 7:27 am

The solution for update 5.0.7 does not work. Do you have another option?


Tony

  • Support Staff

August 8, 2023 at 8:39 am

What error do you get after the above code change?

Adding the ? to the type declaration allows the value to be null or a string so the error must be different now?


Tony

  • Support Staff

August 8, 2023 at 8:39 am

Hang on, which error?


combiwel

August 8, 2023 at 8:42 am

That gives me this error:

 Fatal error: Uncaught Exception: Page route "_events_overview_list_table" with the supplied arguments () threw the following exception: Typed property EE_Model_Relation_Base::$_blocking_delete_error_message must be string, null used
in /home/1034895.cloudwaysapps.com/snjdxyqqby/public_html/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php on line 1158

Call stack:

EE_Admin_Page::_route_admin_request()
wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php:1102
EE_Admin_Page_CPT::route_admin_request()
wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_Init.core.php:258
EE_Admin_Page_Init::initialize_admin_page()
wp-includes/class-wp-hook.php:308
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:332
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-admin/admin.php:259


combiwel

August 8, 2023 at 8:48 am

After doing:
protected ?string $_timezone = '';

I had to do:
protected ?string $_blocking_delete_error_message;

and after changing that I hade to go to the EE_HABTM_Relation.php file to change:
protected ?string $_model_relation_chain_to_join_model = '';

and after that it worked


Tony

  • Support Staff

August 9, 2023 at 3:56 am

We have found the cause and a fix has been applied to 5.0.8.p for new downloads, we’ll push an update with an ‘official’ release fix once ready.

Viewing 18 reply threads

The support post ‘Fatal Error in Event Espresso Core’ 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