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

**URL:** <https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780>\
**Category:** Bug\
**Tags:** custom-dashboard\
**Created:** [September 10, 2020, 11:18am UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780 "2020-09-10T11:18:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![wpexpert](https://community.mainwp.com/user_avatar/community.mainwp.com/wpexpert/32/539_2.png) [@wpexpert](https://community.mainwp.com/u/wpexpert)\
**Post date:** [September 10, 2020, 11:18am UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780/1 "2020-09-10T11:18:14Z")

</div>

# Hello, 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?  
Thanks,  
Fred

---

<div class="post-metadata">

**Author:** ![bogdan](https://community.mainwp.com/user_avatar/community.mainwp.com/bogdan/32/11_2.png) [@bogdan](https://community.mainwp.com/u/bogdan)\
**Post date:** [September 10, 2020, 2:05pm UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780/2 "2020-09-10T14:05:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wpexpert](https://community.mainwp.com/user_avatar/community.mainwp.com/wpexpert/32/539_2.png) [@wpexpert](https://community.mainwp.com/u/wpexpert)\
**Post date:** [September 10, 2020, 2:36pm UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780/3 "2020-09-10T14:36:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bogdan](https://community.mainwp.com/user_avatar/community.mainwp.com/bogdan/32/11_2.png) [@bogdan](https://community.mainwp.com/u/bogdan)\
**Post date:** [September 10, 2020, 3:01pm UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780/4 "2020-09-10T15:01:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![wpexpert](https://community.mainwp.com/user_avatar/community.mainwp.com/wpexpert/32/539_2.png) [@wpexpert](https://community.mainwp.com/u/wpexpert)\
**Post date:** [September 10, 2020, 3:31pm UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780/5 "2020-09-10T15:31:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bogdan](https://community.mainwp.com/user_avatar/community.mainwp.com/bogdan/32/11_2.png) [@bogdan](https://community.mainwp.com/u/bogdan)\
**Post date:** [September 10, 2020, 3:36pm UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780/6 "2020-09-10T15:36:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![wpexpert](https://community.mainwp.com/user_avatar/community.mainwp.com/wpexpert/32/539_2.png) [@wpexpert](https://community.mainwp.com/u/wpexpert)\
**Post date:** [September 10, 2020, 3:46pm UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780/7 "2020-09-10T15:46:11Z")

</div>

> [@bogdan](#):
>
> mainwp\_custom\_dashboard\_php\_snippet

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

---

<div class="post-metadata">

**Author:** ![bogdan](https://community.mainwp.com/user_avatar/community.mainwp.com/bogdan/32/11_2.png) [@bogdan](https://community.mainwp.com/u/bogdan)\
**Post date:** [September 10, 2020, 5:36pm UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780/8 "2020-09-10T17:36:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://community.mainwp.com/uploads/default/original/2X/4/4cfc87ac67e4ebdbfa0bbf0b19c8657f35a29a5b.png) [@system](https://community.mainwp.com/u/system)\
**Post date:** [September 11, 2020, 5:36pm UTC](https://community.mainwp.com/t/mainwp-custom-dashboard-extension-version-4-0-crashed-site-after-4-1-update/1780/9 "2020-09-11T17:36:55Z")

</div>

Closed on September 11, 2020, 5:36pm UTC

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