Title: CRITICAL Uncaught Error (Elementor.php)
Last modified: June 24, 2019

---

# CRITICAL Uncaught Error (Elementor.php)

 *  Resolved [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/)
 * Greetings,
 * I’m getting this in my error logs:
 *     ```
       CRITICAL Uncaught Error: Call to a member function is_edit_mode() on null in /home/cloudwaysapps.com/mydomain/public_html/wp-content/plugins/quadmenu/includes/3rd/elementor.php:40
       Stack trace:
       #0 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/class-wp-hook.php(286): QuadMenu_Elementor->footer('')
       #1 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
       #2 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
       #3 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/general-template.php(2761): do_action('wp_footer')
       #4 /home/cloudwaysapps.com/mydomain/public_html/wp-content/themes/astra/footer.php(32): wp_footer()
       #5 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/template.php(722): require_once('/home/cl...')
       #6 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/template.php(671): load_template('/home/ in
       /home/cloudwaysapps.com/mydomain/public_html/wp-content/plugins/quadmenu/includes/3rd/elementor.php on line 40
       ```
   
 * Any idea what may be causing this?
 * Thanks!

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/page/2/?output_format=md)

 *  Plugin Author [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * (@quadlayers)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11725106)
 * hello
 * thanks for reporting this issue
    what is your current version of elementor?
 *  Thread Starter [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11726768)
 * [@quadlayers](https://wordpress.org/support/users/quadlayers/) There’s been several
   versions of WP.org Elementor since I noticed this issue and each had the same
   problem. I’m currently on version 2.6.1.
 *  Plugin Author [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * (@quadlayers)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11731045)
 * hello [@gravatard](https://wordpress.org/support/users/gravatard/) we’re unable
   to reproduce your issue
 * can you describe the steps to reproduce the error
 * there are no other users reporting this
 *  Thread Starter [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11731143)
 * [@quadlayers](https://wordpress.org/support/users/quadlayers/)
 * Unfortunately I can’t describe the steps I took to reproduce the issue other 
   than updating to WordPress 5.2.
 * Perhaps in tests you can try Astra theme, Elementor, and QuadMenu.
 * The QuadMenu plugin is working on my site, but have now received 24 daily emails
   sent by WordPress stating “Your Site is Experiencing a Technical Issue”.
 * In my first post, I outline where the critical error is:
    `/wp-content/plugins/
   quadmenu/includes/3rd/elementor.php - LINE 40`
 * WordPress 5.2 does not like this line of code in your plugin:
    `if (!Elementor\
   Plugin::$instance->editor->is_edit_mode() && !Elementor\Plugin::$instance->preview-
   >is_preview_mode()) {`
 * I searched for some answers and will post what I found. I hope one of these leads
   towards a solution:
    [https://code.elementor.com/methods/elementor-editor-is_edit_mode/](https://code.elementor.com/methods/elementor-editor-is_edit_mode/)
   [https://github.com/WordPress/gutenberg/issues/15209](https://github.com/WordPress/gutenberg/issues/15209)
   [https://sourceforge.net/p/concretecms/discussion/814373/thread/b5bc70b9/](https://sourceforge.net/p/concretecms/discussion/814373/thread/b5bc70b9/)
 *  Thread Starter [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11731146)
 * FYI, SJ Elementor Addon also had this issue but the developer never resolved 
   it:
    [https://wordpress.org/support/topic/fatal-error-call-to-a-member-function-is_edit_mode-on-null/](https://wordpress.org/support/topic/fatal-error-call-to-a-member-function-is_edit_mode-on-null/)
 *  Plugin Author [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * (@quadlayers)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11773580)
 * hello [@gravatard](https://wordpress.org/support/users/gravatard/)
 * what is the context of this issue?
 * customizer, admin, frontend?
 *  Thread Starter [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11774182)
 * Thanks for responding.
 * Would you mind reading through this thread? Your QuadMenu plugin has an error:
 * `CRITICAL Uncaught Error: Call to a member function is_edit_mode() on null in/
   home/cloudwaysapps.com/mydomain/public_html/wp-content/plugins/quadmenu/includes/
   3rd/elementor.php:40`
 * Can you review the doc I linked above? Perhaps there was an Elementor code change
   since your last update: [https://code.elementor.com/methods/elementor-editor-is_edit_mode/](https://code.elementor.com/methods/elementor-editor-is_edit_mode/)
 * I get an email everyday since WordPress 5.2 that says QuadMenu has a critical
   error that must be fixed. There are no visible issues on my website, so don’t
   know how to diagnose other than you reviewing LINE 40 in the PHP file mentioned
   above.
 *  Plugin Author [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * (@quadlayers)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11776143)
 * [@gravatard](https://wordpress.org/support/users/gravatard/) please test update
   1.8.7
 *  Thread Starter [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11790752)
 * [@quadlayers](https://wordpress.org/support/users/quadlayers/) I have installed
   update 1.8.7 and think the error regarding LINE 40 is fixed, so thanks for that!
 * Now I receive a new error regarding LINE 44. Here is the email WordPress 5.2 
   sends me regarding new QuadMenu 1.8.7 issue:
 *     ```
       [Subject] Your Site is Experiencing a Technical Issue
   
       Howdy!
   
       Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
   
       In this case, WordPress caught an error with one of your plugins, QuadMenu.
   
       First, visit your website (https://www.mydomain.com/) and check for any visible issues. Next, visit the page where the error was caught (https://www.mydomain.com/wp-login.php) and check for any visible issues.
   
       Error Details
       =============
       An error of type E_ERROR was caused in line 44 of the file /home/cloudwaysapps.com/mydomain/public_html/wp-content/plugins/quadmenu/includes/3rd/elementor.php. Error message: Uncaught Error: Call to a member function is_preview_mode() on null in /home/cloudwaysapps.com/mydomain/public_html/wp-content/plugins/quadmenu/includes/3rd/elementor.php:44
       Stack trace:
       #0 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/class-wp-hook.php(286): QuadMenu_Elementor->footer('')
       #1 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
       #2 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
       #3 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/general-template.php(2761): do_action('wp_footer')
       #4 /home/cloudwaysapps.com/mydomain/public_html/wp-content/themes/astra/footer.php(32): wp_footer()
       #5 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/template.php(722): require_once('/home/cl...')
       #6 /home/cloudwaysapps.com/mydomain/public_html/wp-includes/template.php(671): load_template('/home/2487
       ```
   
 * So this time it’s LINE 44 of quadmenu/includes/3rd/elementor.php. Apparently 
   the call to a member function is_preview_mode() on null caused an error of type
   E_ERROR.
 * Can you look into it please?
 *  Thread Starter [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11790790)
 * Here is the Elementor code reference for is_preview_mode: [https://code.elementor.com/methods/elementor-preview-is_preview_mode/](https://code.elementor.com/methods/elementor-preview-is_preview_mode/)
 *  Thread Starter [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11796084)
 * [@quadlayers](https://wordpress.org/support/users/quadlayers/) Can you look into
   this please?
 *  Plugin Author [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * (@quadlayers)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11865709)
 * hello [@gravatard](https://wordpress.org/support/users/gravatard/)
 * we’ve updated to 1.8.8
 * please can you check if this solves the alert issue
 * kind regards
 *  Thread Starter [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11983457)
 * hello [@quadlayers](https://wordpress.org/support/users/quadlayers/)
 * I have updated to 1.8.8 and this has resolved the critical error on LINE 44 issue.
 * HOWEVER, now there is another critical error, LINE 35 in your plugin:
 *     ```
       Error Details
       =============
       An error of type E_ERROR was caused in line 35 of the file /home/mydomain.cloudwaysapps.com/domain/public_html/wp-content/plugins/quadmenu/includes/frontend/walker/QuadMenuWalker.class.php. Error message: Uncaught Error: Class 'QuadMenuItemProductCat' not found in /home/mydomain.cloudwaysapps.com/domain/public_html/wp-content/plugins/quadmenu/includes/frontend/walker/QuadMenuWalker.class.php:35
       Stack trace:
       #0 /home/mydomain.cloudwaysapps.com/domain/public_html/wp-includes/class-wp-walker.php(246): QuadMenuWalker->display_element(Object(WP_Post), Array, 99, 0, Array, '')
       #1 /home/mydomain.cloudwaysapps.com/domain/public_html/wp-includes/nav-menu-template.php(580): Walker->walk(Array, 99, Object(stdClass))
       #2 /home/mydomain.cloudwaysapps.com/domain/public_html/wp-includes/nav-menu-template.php(213): walk_nav_menu_tree(Array, 99, Object(stdClass))
       #3 /home/mydomain.cloudwaysapps.com/domain/public_html/wp-content/plugins/astra-addon/addons/header-sections/classes/class-astra-ext-header-sections-markup.php(428): wp_nav_menu(Object(stdClass))
       #4 /home/mydomain.cloudwaysapps.com/domain/public_html/wp-content/plugins/astra-addon/addons/header-sections/classes/class-astra-ext-header-sections-markup.php(271
       ```
   
 * Can look into this please? I get daily emails with critical errors from QuadMenu,
   and have been getting them for almost 90 days straight. =(
 *  Plugin Author [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * (@quadlayers)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-11984123)
 * hello [@gravatard](https://wordpress.org/support/users/gravatard/)
    please test
   update 1.9.3
 *  Thread Starter [gravatard](https://wordpress.org/support/users/gravatard/)
 * (@gravatard)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/#post-12002791)
 * [@quadlayers](https://wordpress.org/support/users/quadlayers/)
 * Thanks, I have updated to 1.9.3, and now the critical error has been replaced
   with this error:
 *     ```
       An error of type E_ERROR was caused in line 70 of the file /home/domain.cloudwaysapps.com/domain/public_html/wp-content/plugins/quadmenu/includes/frontend/walker/QuadMenuItemCart.class.php. Error message: Uncaught Error: Call to a member function get_cart_contents_count() on null in /home/domain.cloudwaysapps.com/domain/public_html/wp-content/plugins/quadmenu/includes/frontend/walker/QuadMenuItemCart.class.php:70
       Stack trace:
       #0 /home/domain.cloudwaysapps.com/domain/public_html/wp-content/plugins/quadmenu/includes/frontend/walker/QuadMenuItemCart.class.php(43): QuadMenuItemCart->add_item_classes_cart()
       #1 /home/domain.cloudwaysapps.com/domain/public_html/wp-content/plugins/quadmenu/includes/frontend/walker/QuadMenuItem.class.php(107): QuadMenuItemCart->get_start_el()
       #2 /home/domain.cloudwaysapps.com/domain/public_html/wp-content/plugins/quadmenu/includes/frontend/walker/QuadMenuWalker.class.php(85): QuadMenuItem->start_el()
       #3 /home/domain.cloudwaysapps.com/domain/public_html/wp-content/plugins/quadmenu/includes/frontend/walker/QuadMenuWalker.class.php(41): QuadMenuWalker->start_el('
       ```
   
 * Can you look into this please?
    -  This reply was modified 6 years, 8 months ago by [gravatard](https://wordpress.org/support/users/gravatard/).

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/page/2/?output_format=md)

The topic ‘CRITICAL Uncaught Error (Elementor.php)’ is closed to new replies.

 * ![](https://ps.w.org/quadmenu/assets/icon-256x256.jpg?rev=2916917)
 * [QuadMenu - Mega Menu](https://wordpress.org/plugins/quadmenu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quadmenu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quadmenu/)
 * [Active Topics](https://wordpress.org/support/plugin/quadmenu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quadmenu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quadmenu/reviews/)

## Tags

 * [critical error](https://wordpress.org/support/topic-tag/critical-error/)

 * 17 replies
 * 2 participants
 * Last reply from: [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/critical-uncaught-error-elementor-php/page/2/#post-12012804)
 * Status: resolved