MainWP Custom Dashboard Extension (version 4.0) crashed site after 4.1 update

I updated MainWP dashboard to the last version and the MainWP Custom Dashboard Extension (version 4.0) crashed the site! I had to disable it. Here is the error message:
Current plugin: MainWP Custom Dashboard Extension (version 4.0)
PHP version 7.3.21
Error Details

An error of type E_ERROR was caused in line 47 of the file /home/xxx/public_html/wp-content/plugins/mainwp-custom-dashboard-extension/class/mainwp-custom-dashboard.class.php(60) : eval()'d code. Error message: Uncaught Error: Call to undefined method MainWP_DB::getSQLWebsitesForCurrentUser() in /home/xxx/public_html/wp-content/plugins/mainwp-custom-dashboard-extension/class/mainwp-custom-dashboard.class.php(60) : eval()‘d code:47
Stack trace:
#0 /home/xxx/public_html/wp-includes/class-wp-hook.php(287): quick_form_in_admin_bar2(’\t\t

It is because I had some code in there before the update?

Hi Fred, can you please try the version 4.0.1 that we released about an hour ago?

1 Like

Same issue, critical error and crashed the dashboard but not the WP site this time…

Hi Fred, thanks for verifying that.

I think that the problem is coming from custom code saved in the Custom Dashboard extension.

Can you please try to check the extension database table via phpMyAdmin and remove custom PHP code from there and see if that helps?

Thanks! You have so many tables in the DB, do you know which one it is?

Hey Fred, apologies for my misleading message. The extension actually stores the code in the wp_options table. Please search for the mainwp_custom_dashboard_php_snippet field.

It worked! I removed the PHP functions and activated the plugin and we are back in Business!
Thanks @bogdan. Selected your solution.

1 Like

Thanks Fred for verifying that. I am happy to see that the problem is solved.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.