Support

Home Forums Event Espresso Premium Fatal error after update to 4.10.20.p

Fatal error after update to 4.10.20.p

Posted: December 1, 2021 at 9:27 am


greyowl

December 1, 2021 at 9:27 am

Fatal error: Uncaught Error: Cannot access private property EEW_Upcoming_Events::$category in /home/lernenim/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php:3685 Stack trace: #0 /home/lernenim/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php(3133): FLBuilderModel::get_wp_widgets() #1 /home/lernenim/public_html/wp-content/plugins/ultimate-addons-for-beaver-builder-lite/classes/class-ui-panel.php(363): FLBuilderModel::get_categorized_modules() #2 /home/lernenim/public_html/wp-includes/class-wp-hook.php(303): UABB_UI_Panels->render_ui(”) #3 /home/lernenim/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #4 /home/lernenim/public_html/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #5 /home/lernenim/public_html/wp-includes/general-template.php(3031): do_action(‘wp_footer’) #6 /home/lernenim/public_html/wp-content/themes/bb-theme/footer.php(34): wp_footer() #7 /home/lernenim/public_html/wp-includes/template.php(770): require_once(‘ in /home/lernenim/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php on line 3685


greyowl

December 1, 2021 at 10:03 am

This may not be an EE error but a Beaver Builder problem. Sorry.


Tony

  • Support Staff

December 1, 2021 at 11:31 am

Hi Greyowl,

This does indeed look like an issue within Beaver builder.

I noticed you’ve marked the thread resolved, may I ask what the issue/solution was?


greyowl

December 1, 2021 at 11:54 am

It is indeed caused by the new version of EE. I had to deactivate EE to be able to edit a Beaver Builder page, and then reactivate it after editing. There must be something wrong in connection with “Cannot access private property EEW_Upcoming_Events::$category”


greyowl

December 1, 2021 at 12:00 pm

It isn’t resolved (my mistake). If I use BB to edit a page (which has no connection to EE!), I get the above access error.


Vals

December 1, 2021 at 2:16 pm

Hello, I can report this same exact issue.

While it seems related to Beaver Builder, we’ve done extensive testing and the breakage only happens when upgrading to 4.10.20.p. When I roll EE back to 4.10.10.p, Beaver Builder is fine.

When EE is at version 4.10.20.p, Beaver Builder breaks and throws console errors. Digging into server logs, I can see EEW functions mentioned.

screenshot

Here’s a fatal error from the log that mentions both EE and BB:

PHP Fatal error: Uncaught Error: Cannot access private property EEW_Upcoming_Events::$category in /nas/content/live/tipacademy/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php:3647\nStack trace:\n#0 /nas/content/live/tipacademy/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php(3150): FLBuilderModel::get_wp_widgets()\n#1 /nas/content/live/tipacademy/wp-content/plugins/bb-plugin/classes/class-fl-builder-ui-content-panel.php(282): FLBuilderModel::get_uncategorized_modules()\n#2 /nas/content/live/tipacademy/wp-content/plugins/bb-plugin/includes/ui-js-config.php(50): FLBuilderUIContentPanel::get_content_elements()\n#3 /nas/content/live/tipacademy/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(1178): include(‘/nas/content/li…’)\n#4 /nas/content/live/tipacademy/wp-includes/class-wp-hook.php(303): FLBuilder::render_ui(”)\n#5 /nas/content/live/tipacademy/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)\n#6 /nas/content/live/tipacademy/wp-includes/plugin.php(470): WP_Hook->do_ac in /nas/content/live/tipacademy/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php on line 3647, referer:


Tony

  • Support Staff

December 1, 2021 at 2:39 pm

It is indeed caused by the new version of EE.

The difference between the previous version and now is the Upcoming events widget has a private property called category. It’s not unusual for a class to have private properties but we can’t stop other plugins from trying to call those properties (which is what is happening here).

There must be something wrong in connection with “Cannot access private property EEW_Upcoming_Events::$category”

In English, the error is saying “Woah there class-fl-builder-model.php! You can’t access the private property $category within the EEW_Upcoming_Events class”.

Beaver builder is what is calling the category property on the widget and as it’s a private property (which can only be access by the class itself) the above fatal is thrown.

I downloaded the free version of Beaver builder and had a look at the code, this is what is throwing the fatal error:


/**
 * Returns an array of data for each core WordPress widget.
 *
 * @since 1.0
 * @return array
 */
static public function get_wp_widgets() {
	global $wp_widget_factory;

	$widgets = array();

	/**
	 * Array of known widgets that won't work in the builder.
	 * @see fl_get_wp_widgets_exclude
	 */
	$exclude = apply_filters( 'fl_get_wp_widgets_exclude', array(
		'WP_Widget_Media_Audio',
		'WP_Widget_Media_Image',
		'WP_Widget_Media_Video',
		'WP_Widget_Media_Gallery',
		'WP_Widget_Text',
		'WP_Widget_Custom_HTML',
	) );

	foreach ( $wp_widget_factory->widgets as $class => $widget ) {
		if ( in_array( $class, $exclude ) ) {
			continue;
		}
		$widget->class            = $class;
		$widget->isWidget         = true; // @codingStandardsIgnoreLine
		$widget->category         = __( 'WordPress Widgets', 'fl-builder' );
		$widgets[ $widget->name ] = $widget;
	}

	ksort( $widgets );

	return $widgets;
}

Beaver builder is calling all widgets, looping over them all and trying to set the category to ‘WordPress Widgets’here:

$widget->category = __( 'WordPress Widgets', 'fl-builder' );

Thats what is throwing the error, not Event Espresso and that is why you get the error on page with no connection to Event Espresso at all.

Having said that, I think we can change our property to something other than just ‘category’ to work around this, which is more of a workaround really, but should work.


Tony

  • Support Staff

December 2, 2021 at 1:54 pm

Hi there,

I’ve just pushed an update for this.

If you don’t see it yet then go to Event Espresso -> General Settings, make no changes and just hit save to force an update check.

That should show the update in Dashboard -> Plugins.

Update to 4.10.21.p and that should resolve the fatal from Beaver Builder.


greyowl

December 3, 2021 at 1:40 am

Thanks very much. That works now.


Tony

  • Support Staff

December 3, 2021 at 7:23 am

You’re most welcome, I’m glad it worked.

The support post ‘Fatal error after update to 4.10.20.p’ 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