Support

Home Forums Event Espresso Premium Eventespresso shortcode breaks page

Eventespresso shortcode breaks page

Posted: July 3, 2023 at 4:47 am

Viewing 7 reply threads


Webmaster_ARMA_NL

July 3, 2023 at 4:47 am

Hi, Eventespresso shortcode breaks our home page. We use elementor to make our webpages, and if I want to put an evenespresso shortcode on the homepage for showing our event grid it breaks the page. However on the even page itself where there are no other elementor elements it works just fine…

If I turn on the safe mode in elementor I can see this error message :

Uncaught TypeError: EES_Shortcode::fallback_shortcode_processor(): Argument #1 ($attributes) must be of type ?array, string given, called in /var/www/vhosts/armanl.eu/staging.armanl.eu/wp-includes/shortcodes.php on line 355 and defined in /var/www/vhosts/armanl.eu/staging.armanl.eu/wp-content/plugins/event-espresso-core-reg/core/EES_Shortcode.shortcode.php:95
Stack trace:
#0 /var/www/vhosts/armanl.eu/staging.armanl.eu/wp-includes/shortcodes.php(355): EES_Shortcode::fallback_shortcode_processor(”, ”, ‘ESPRESSO_GRID_T…’)
#1 [internal function]: do_shortcode_tag(Array)
#2 /var/www/vhosts/armanl.eu/staging.armanl.eu/wp-includes/shortcodes.php(227): preg_replace_callback(‘/\\[(\\[?)(ESPRES…’, ‘do_shortcode_ta…’, ‘

How could I fix this problem?

Thanks for your help!

Bea


Tony

  • Support Staff

July 4, 2023 at 9:42 am

Hi Bea,

I have created a ticket to investigate the above error, however, on testing this I’m not getting any errors when using the EE shortcodes within Elementor.

Can you add some details on how you have it set up so I can reproduce it locally?


Tony

  • Support Staff

July 4, 2023 at 9:44 am

Actually, scratch that!

I can reproduce it and have added the details to the ticket.


Webmaster_ARMA_NL

July 5, 2023 at 2:36 am

Hi Tony, OK, thank you for investigating it! Bea


Tony

  • Support Staff

July 5, 2023 at 4:21 am

We have fixed this in the next version of Event Espresso, if you are comfortable with PHP you can add a patch to the version you are currently running to get it working for now:

/event-espresso-core/core/EES_Shortcode.shortcode.php

Line 95 will have final public static function fallback_shortcode_processor(array $attributes = null)

Remove array so its just:

final public static function fallback_shortcode_processor($attributes = null)

That should allow the shortcodes to work on your install whilst we get an update ready for release.


Webmaster_ARMA_NL

July 5, 2023 at 9:34 am

Hi Tony, I am not a developer, and don’t want to make changes in the source files. (I know I could do it through the child theme…) Is it possible to put this code in to a snippet? I use Code Snippets on the website.

Thanks again, Bea


Tony

  • Support Staff

July 5, 2023 at 1:16 pm

Hi Bea,

No this isn’t something we can fix with a snippet unfortunately, it needs an update to the core code.


Webmaster_ARMA_NL

July 6, 2023 at 4:04 am

Hi Tony, thank you! Then I will fix it in the php file for now. Bea

Viewing 7 reply threads

The support post ‘Eventespresso shortcode breaks page’ 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