Support

Home Forums Event Espresso Premium add events to events espresso causes critical error

add events to events espresso causes critical error

Posted: February 2, 2024 at 9:42 am


Belle

February 2, 2024 at 9:42 am

When adding new event site throws a critical error.
https://artspotonwheels.com

from the WordPress notification email:
WordPress version 6.4.2
Active theme: Art Spot on Wheels (version 1.0.0)
Current plugin: Event Espresso (version 5.0.16.p)
PHP version 8.2.14

Error Details
=============
An error of type E_ERROR was caused in line 1156 of the file /nas/content/live/artspotonwheel/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php. Error message: Uncaught Error: Cannot use object of type stdClass as array in /nas/content/live/artspotonwheel/wp-content/plugins/eea-mailchimp/lib/EE_MCI_Controller.class.php:1147
Stack trace:
#0 /nas/content/live/artspotonwheel/wp-content/plugins/eea-mailchimp/lib/EE_MCI_Controller.class.php(620): EE_MCI_Controller->is_db_data_api_compatible(8099)
#1 /nas/content/live/artspotonwheel/wp-content/plugins/eea-mailchimp/EED_Mailchimp.module.php(379): EE_MCI_Controller->mci_set_metabox_contents(Object(WP_Post))
#2 /nas/content/live/artspotonwheel/wp-admin/includes/template.php(1456): EED_Mailchimp::espresso_mailchimp_render_box_content(Object(WP_Post), Array)
#3 /nas/content/live/artspotonwheel/wp-admin/edit-form-advanced.php(707): do_meta_boxes(Object(WP_Screen), ‘side’, Object(WP_Post))
#4 /nas/content/live/artspotonwheel/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php(1416): include_once(‘/nas/content/li…’)
#5 /nas/content/live/artspotonwheel/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php(1477): EE_Admin_Page_CPT->loadEditorTemplate(false)
#6 /nas/content/live/artspotonwheel/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php(1149): EE_Admin_Page_CPT->_edit_cpt_item()
#7 /nas/content/live/artspotonwheel/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php(399): EE_Admin_Page->_route_admin_request()
#8 /nas/content/live/artspotonwheel/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php(747): EE_Admin_Page_CPT->_load_page_dependencies()
#9 /nas/content/live/artspotonwheel/wp-includes/class-wp-hook.php(324): EE_Admin_Page->load_page_dependencies(”)
#10 /nas/content/live/artspotonwheel/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
#11 /nas/content/live/artspotonwheel/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#12 /nas/content/live/artspotonwheel/wp-admin/admin.php(237): do_action(‘load-toplevel_p…’)
#13 {main}

Next RuntimeException: Page route "_edit_cpt_item" with the supplied arguments () threw the following exception: Cannot use object of type stdClass as array in /nas/content/live/artspotonwheel/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php:1156
Stack trace:
#0 /nas/content/live/artspotonwheel/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php(399): EE_Admin_Page->_route_admin_request()
#1 /nas/content/live/artspotonwheel/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php(747): EE_Admin_Page_CPT->_load_page_dependencies()
#2 /nas/content/live/artspotonwheel/wp-includes/class-wp-hook.php(324): EE_Admin_Page->load_page_dependencies(”)
#3 /nas/content/live/artspotonwheel/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
#4 /nas/content/live/artspotonwheel/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /nas/content/live/artspotonwheel/wp-admin/admin.php(237): do_action(‘load-toplevel_p…’)
#6 {main}
thrown


Belle

February 5, 2024 at 9:34 am

Rio – my name is Chris and I am the web dev. Client has been using EE for some time but it is new to me. I am unsure what the legacy editor looks like versus the advanced editor.

The edit event screen is not the classic wordpress editor nor is it the block editor.

It has 6 tabs across the top abobe the title:
Overview, Edit Event, Categories, Templates, Default Settings and Default Tickets.

Below the content section are sections for Venue Details. Event Tickets & Datetimes

https://snipboard.io/30NPZb.jpg

I can ask the client to try and loom when editing but she is not very tech savvy.

All events appear to have connected tickets.

Please copy chris@missionwebmarketing.com on replies.

Thanks, Chris


Belle

February 5, 2024 at 9:58 am

I also just found your gist for a snippet to install if we use Yoast Seo.
https://github.com/eventespresso/ee-code-snippet-library/blob/master/third-party-integration/tw_ee_load_yoast_seo_within_ee.php

We will install this snippet and see if it resolves the issue as well.
Chris


Tony

  • Support Staff

February 5, 2024 at 9:59 am

Hi Chris,

The issues appears to be caused by our MailChimp add-on (I am current investigating this).

If you deactivate that add-on and try again does it work then?


Karen

February 5, 2024 at 10:31 am

We’re having the same issue (the exact same error) and the MailChimp extension is not turned on. We did recently update to PHP 8


Karen

February 5, 2024 at 10:33 am

This is the notice we got:

Error Details
=============
An error of type E_ERROR was caused in line 1165 of the file /home/—/public_html/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php. Error message: Uncaught TypeError: EE_Admin_Page_CPT::modify_edit_post_link(): Argument #1 ($link) must be of type string, null given, called in /home/pacraf5/public_html/wp-includes/class-wp-hook.php on line 326 and defined in /home/—/public_html/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php:1165
Stack trace:
#0 /home/—/public_html/wp-includes/class-wp-hook.php(326): EE_Admin_Page_CPT->modify_edit_post_link(NULL, 62049)
#1 /home/—/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array)
#2 /home/—/public_html/wp-includes/link-template.php(1499): apply_filters(‘get_edit_post_l…’, ”, 62049, ‘url’)
#3 /home/—/public_html/wp-admin/includes/post.php(2184): get_edit_post_link(Object(WP_Post), ‘url’)
#4 /home/—/public_html/wp-admin/post.php(234): redirect_post(62049)
#5 {main}
thrown


Belle

February 5, 2024 at 11:12 am

update

we use Yoast premium. I have added the snippet from https://github.com/eventespresso/ee-code-snippet-library/blob/master/third-party-integration/tw_ee_load_yoast_seo_within_ee.php

i still don’t see the yoast meta boxes on the edit event screen and client does require mailchimp too although I have temporarily disabled that per your instructions

Chris


Tony

  • Support Staff

February 5, 2024 at 4:40 pm

Hi there,

We’re having the same issue (the exact same error) and the MailChimp extension is not turned on. We did recently update to PHP 8

The error you’ve posted above is actually completely different to the one in this thread.

This is the original error:

An error of type E_ERROR was caused in line 1156 of the file /wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php. Error message: Uncaught Error: Cannot use object of type stdClass as array in /wp-content/plugins/eea-mailchimp/lib/EE_MCI_Controller.class.php:1147

So the reason I mentioned the MailChimp add-on is because this:

eea-mailchimp/lib/EE_MCI_Controller.class.php

Is referencing a class within that add-on.

Your error is:

An error of type E_ERROR was caused in line 1165 of the file /wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php. Error message: Uncaught TypeError: EE_Admin_Page_CPT::modify_edit_post_link(): Argument #1 ($link) must be of type string, null given, called in /wp-includes/class-wp-hook.php on line 326 and defined in /wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page_CPT.core.php:1165

That’s from within Event Espresso core itself, I’ve seen that error before.

It looks like something is hooking into get_edit_post_link and returning null

We have a fix in the next version of Event Espresso to prevent that fatal.

Do you have FTP access to the site?


Karen

February 6, 2024 at 6:07 am

Yes I do.


Tony

  • Support Staff

February 6, 2024 at 3:32 pm

Hi Karen,

I’ve just pushed an update which should fix your specific fatal error, that version is 5.0.17.p

If you don’t see it available on your site just yet, then on the site go to Event Espresso -> General Settings. Make no changes and just hit save to force an update check, the update should then show in Dashboard -> Plugins.


Belle

February 6, 2024 at 3:35 pm

I also have FTP access to our site. Any update on a solution for artspotonwheels.com?

We are still having the Yoast issue after adding the snippet.

Thanks,
Chris


Tony

  • Support Staff

February 6, 2024 at 3:39 pm

This reply has been marked as private.


Belle

February 7, 2024 at 1:52 pm

Tony – the error stopped after mailchimp was disabled. I have reactivated it and the client is testing again. When I hear back from her I will let you know. If she has no issues then it’s not the mailchimp add-on. If she has them again then it is the mailchimp add-on. It could also be that the code snippet for yoast resolved the critical error.

I’ll update you as soon as I know more.

Chris


Belle

February 7, 2024 at 1:53 pm

This reply has been marked as private.


Karen

February 8, 2024 at 6:52 am

The update worked for us. Thank you!


Tony

  • Support Staff

February 8, 2024 at 7:31 am

The update worked for us. Thank you!

Awesome, I’m glad it worked.

Any further issues just let us know.

The support post ‘add events to events espresso causes critical error’ 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