NO BUG: Total white screen when trying to edit template


Host: Hostinger (v2.2.0)
Wordpress: 6.5.2

Modern Events Calendar: 6.9.0
MEC Advanced Organizer: 1.3.2

Other Plugins installed and activated: Advanced Custom Fields PRO, Contact Form 7, MEC Advanced Location, MEC Advanced Speaker, Relevanssi, Relevanssi Live Ajax Search, Site Kit by Google, Social Feed Gallery, Social Icons Widget & Block by WPZOOM, WP Grid Builder - V2, WP Grid Builder - Bricks, WP Grid Builder - Map Facet

I setup a template to use for populating information from posts and it worked flawlessly. However, two days ago, I installed Modern Events Calendar and the Advanced Organizer add-on. One of the features is being able to put a shortcode for the advanced organizer on a page. I put it on the original template and it worked great.

However, the next morning, when I went in to edit the page, and it was an entire white screen. The Bricks Builder didn’t even show up.

I recreated the template with the shortcode and things worked fine again.

I woke up this morning and the page is entirely white again. I can’t figure out what could possibly be happening overnight.

Does anyone have any idea on what could be the issue?

  • If I deactivate the “MEC Advanced Organizer” plug-in, it works fine but the shortcode them doesn’t work.

If I deactivate the “MEC Advanced Organizer” plug-in, go into the template and turn off shortcode render preview for the short-code, then activate the plug-in, I can edit the template just fine. But I turn on the shortcode render preview, exit the template, and try to edit it again; white screen.

Hostinger offers LiteSpeed’s advanced cache-engine but that is turned off.

Additional details

When I choose to Edit with Bricks for the template, this is the URL for the white screen:

I tried opening a page that uses the template and it loads fine.

I tried reinstalled both MEC and the add-on and it reset some of the code changes I made for the shortcode styling but didn’t fix the actual issue.

When I turned on debug mode, it populates with this every time I try to edit the template with Bricks:

[15-Apr-2024 20:28:19 UTC] PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, WP_Error given in /home/u233369897/domains/
Stack trace:
#0 /home/u233369897/domains/ count()
#1 /home/u233369897/domains/ MEC_Advanced_Organizer\Core\OrganizerWidget\MEC_Advanced_Organizer_OrganizerWidget_Frontend::single_organizer_content()
#2 [internal function]: do_shortcode_tag()
#3 /home/u233369897/domains/ preg_replace_callback()
#4 /home/u233369897/domains/ do_shortcode()
#5 /home/u233369897/domains/ Bricks\Element_Shortcode->render()
#6 /home/u233369897/domains/ Bricks\Element->init()
#7 /home/u233369897/domains/ Bricks\Ajax::render_element()
#8 /home/u233369897/domains/ Bricks\Builder::query_content_type_for_elements_html()
#9 /home/u233369897/domains/ Bricks\Builder::builder_data()
#10 /home/u233369897/domains/ Bricks\Builder->enqueue_scripts()
#11 /home/u233369897/domains/ WP_Hook->apply_filters()
#12 /home/u233369897/domains/ WP_Hook->do_action()
#13 /home/u233369897/domains/ do_action()
#14 /home/u233369897/domains/ wp_enqueue_scripts()
#15 /home/u233369897/domains/ WP_Hook->apply_filters()
#16 /home/u233369897/domains/ WP_Hook->do_action()
#17 /home/u233369897/domains/ do_action()
#18 /home/u233369897/domains/ wp_head()
#19 /home/u233369897/domains/ require_once('/home/u23336989...')
#20 /home/u233369897/domains/ load_template()
#21 /home/u233369897/domains/ locate_template()
#22 /home/u233369897/domains/ get_header()
#23 /home/u233369897/domains/ include('/home/u23336989...')
#24 /home/u233369897/domains/ require_once('/home/u23336989...')
#25 /home/u233369897/domains/ require('/home/u23336989...')
#26 {main}
  thrown in /home/u233369897/domains/ on line 97

I didn’t took the time to read through your article, but the description might be related to those known issues:

Thank you. Unfortunately, I don’t even get the editor. It’s a completely white screen.

The cause of the issue is on the first line of the error log.

it’s due the count() function found in …/wp-content/plugins/mec-advanced-organizer/core/organizerWidget/frontend.php

It seems that that shortcode from the ‘Advanced Organizer’ can’t be rendered inside the builder without causing a fatal PHP error, it’s expecting some variable ‘$value’ to be an array, and for some reason when viewing in the builder, it’s not. So when trying to count the array, there’s an error.

Bricks won’t be able to load any content in the builder if there’s a fatal PHP error. To find the root cause of the PHP error, you’re probably best to go to the Advanced Organizer support team, find out why the shortcode can’t be rendered in this situation and provide them access. I doubt it can be resolved from the Bricks side of things.

Some shortcodes come with an extra parameters to help them work better in builders, like ‘visual_builder=true’ or similar i’ve seen before in forms etc, where they purposely change the output specifically for inside builders.

The short term solution, which you mentioned, is to enable the ‘Don’t render in builder’ in the shortcode element, which will prevent it.

(side note - i’m not part of the Bricks team, just saw your post and thought i’d comment as

1 Like

Hi Matthew,
Thanks so much for your report, and welcome to the forum!

As David already mentioned (thanks, mate), it’s best to contact plugin support, as the fatal error is caused by the plugin. If we can support the plugin devs in any way, they can always contact us by mail at

Best regards,