Title: Critical Error when loging into wp-admin
Last modified: May 28, 2021

---

# Critical Error when loging into wp-admin

 *  Resolved [rrichetto](https://wordpress.org/support/users/rrichetto/)
 * (@rrichetto)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/critical-error-when-loging-into-wp-admin/)
 * I cannot log into the admin using [https://kb.economicmodelling.co.uk/wp-admin/](https://kb.economicmodelling.co.uk/wp-admin/)
 * I get an error that says: “There has been a critical error on this website. Please
   check your site admin email inbox for instructions.”
 * I can still see the frontend of the site, however. I tried removing each plugin
   to see which one was causing the plugin, and it seems to be the Post and Page
   Builder plugin. I received this email as well showing the error in more detail,
   and it says this:
 * > `WordPress version 5.7.2
   >  Current theme: EMSI Learn (version 1.0.0) Current
   > plugin: Post and Page Builder (version 1.14.0) PHP version 7.4.18
   > Error Details
   >  ============= An error of type E_ERROR was caused in line 166
   > of the file /nas/content/live/kbuk/wp-content/plugins/post-and-page-builder/
   > vendor/boldgrid/library/src/Library/Dashboard/SortWidgets.php. Error message:
   > Uncaught Error: Unsupported operand types in /nas/content/live/kbuk/wp-content/
   > plugins/post-and-page-builder/vendor/boldgrid/library/src/Library/Dashboard/
   > SortWidgets.php:166 Stack trace: #0 /nas/content/live/kbuk/wp-content/plugins/
   > post-and-page-builder/vendor/boldgrid/library/src/Library/Dashboard/SortWidgets.
   > php(196): Boldgrid\Library\Library\Dashboard\SortWidgets->sortGlobal() #1 /
   > nas/content/live/kbuk/wp-includes/class-wp-hook.php(290): Boldgrid\Library\
   > Library\Dashboard\SortWidgets->wp_dashboard_setup() #2 /nas/content/live/kbuk/
   > wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #3 /
   > nas/content/live/kbuk/wp-includes/plugin.php(484): WP_Hook->do_action(Array)#
   > 4 /nas/content/live/kbuk/wp-admin/includes/dashboard.php(123): do_action(‘wp_dashboard_se…’)#
   > 5 /nas/content/live/kbuk/wp-admin/index.php(15): wp_dashboard_setup() #6 {main}
   > thrown`
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcritical-error-when-loging-into-wp-admin%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Jesse Owens](https://wordpress.org/support/users/jessecowens/)
 * (@jessecowens)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/critical-error-when-loging-into-wp-admin/#post-14507704)
 * Hello [@rrichetto](https://wordpress.org/support/users/rrichetto/) –
 * Thanks for reaching out, I’m sorry to hear about the fatal error.
 * We haven’t seen this error before, but it seems like something specific in your
   configuration has created a situation where a variable we expected to be an array
   is not. Our developers are [working on a fix now](https://github.com/BoldGrid/library/issues/90).
 * While we’re working on an update for this issue, there are two ways you can regain
   access to your site.
 * First, you can simply disable the Post and Page Builder plugin, if you don’t 
   need to use it for a short time.
 * Second, if you would like to continue using the Post and Page Builder, you can“
   comment out” line 28 of the file `/nas/content/live/kbuk/wp-content/plugins/post-
   and-page-builder/vendor/boldgrid/library/src/Library/Dashboard/SortWidgets.php`
   
   like so:
 *     ```
       	public function __construct() {
       	//	Library\Filter::add( $this ); 
             //^^ Add two slashes at the beginning here
       	}
       ```
   
 * I’ll post an update here in this thread once we’ve released the update for you.
    -  This reply was modified 5 years, 2 months ago by [Jesse Owens](https://wordpress.org/support/users/jessecowens/).
      Reason: Fix formatting
 *  Thread Starter [rrichetto](https://wordpress.org/support/users/rrichetto/)
 * (@rrichetto)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/critical-error-when-loging-into-wp-admin/#post-14521824)
 * Thanks Jesse! For now, I commented out that line and I can get in to WP-Admin
   now.
 *  [Jesse Owens](https://wordpress.org/support/users/jessecowens/)
 * (@jessecowens)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-loging-into-wp-admin/#post-14543159)
 * Hi @rrichetto-
 * An update has been released to the BoldGrid Inspirations plugin to address this
   error. If you’re using that plugin in addition to Post and Page Builder, the 
   update will fix this for you.
 * An update to Post and Page Builder with the new library will also be released
   shortly.
 *  Thread Starter [rrichetto](https://wordpress.org/support/users/rrichetto/)
 * (@rrichetto)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-loging-into-wp-admin/#post-14564709)
 * Thanks [@jessecowens](https://wordpress.org/support/users/jessecowens/) for the
   great customer support!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Critical Error when loging into wp-admin’ is closed to new replies.

 * ![](https://ps.w.org/post-and-page-builder/assets/icon-256x256.png?rev=1768477)
 * [Post and Page Builder by BoldGrid - Visual Drag and Drop Editor](https://wordpress.org/plugins/post-and-page-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-and-page-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-and-page-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/post-and-page-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-and-page-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-and-page-builder/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [rrichetto](https://wordpress.org/support/users/rrichetto/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-loging-into-wp-admin/#post-14564709)
 * Status: resolved