{"id":16936,"date":"2016-05-11T17:11:44","date_gmt":"2016-05-11T16:11:44","guid":{"rendered":"https:\/\/www.megamenu.com\/documentation\/faqs\/wordpress-4-5-issues-copy\/"},"modified":"2019-07-04T10:28:59","modified_gmt":"2019-07-04T09:28:59","slug":"javascript-errors-console","status":"publish","type":"ht_kb","link":"https:\/\/www.megamenu.com\/documentation\/javascript-errors-console\/","title":{"rendered":"JavaScript Errors"},"content":{"rendered":"<p>JavaScript errors on your site can stop Max Mega Menu (and other plugins) from behaving correctly.<\/p>\n<p>Symptoms include:<\/p>\n<ul>\n<li>Front End\n<ul>\n<li>Click Event not working<\/li>\n<li>Mobile Toggle not working<\/li>\n<li>Sticky Menu not working<\/li>\n<\/ul>\n<\/li>\n<li>Back End\n<ul>\n<li>Theme Editor tabs not working<\/li>\n<li>Save button not working<\/li>\n<li>Blue Mega Menu button not appearing<\/li>\n<li>Color Picker not working<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Viewing JavaScript Errors in the Console<\/h3>\n<p>These instructions will work for most modern browsers. In the following screenshots we are using Google Chrome.<\/p>\n<h4>Step 1: Open Developer Tools<\/h4>\n<p>Navigate to the page where the problem is happening, then right click anywhere on the page and click &#8216;Inspect Element&#8217; (or &#8216;Inspect&#8217;)<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/inspect.png?cdn\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16946\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/inspect.png\" alt=\"inspect\" width=\"1123\" height=\"735\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/inspect.png 1123w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/inspect-300x196.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/inspect-768x503.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/inspect-1024x670.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/inspect-125x82.png 125w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/inspect-75x49.png 75w\" sizes=\"auto, (max-width: 1123px) 100vw, 1123px\" \/><\/a><\/p>\n<h4>Step 2: Go to the &#8216;Console&#8217; tab<\/h4>\n<p>Once the Developer Tools panel has opened, click the &#8216;Console&#8217; tab.<\/p>\n<p>Any JavaScript errors will be\u00a0listed in red. These will need to be fixed for your site to work correctly.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/console.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16945\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/console.png?cdn\" alt=\"console\" width=\"1123\" height=\"735\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/console.png 1123w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/console-300x196.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/console-768x503.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/console-1024x670.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/console-125x82.png 125w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/console-75x49.png 75w\" sizes=\"auto, (max-width: 1123px) 100vw, 1123px\" \/><\/a><\/p>\n<h4>Step 3: Locate the source of the error<\/h4>\n<p>In this example I can see the error is originating from line 40 of \/wp-content\/twentytwelve\/js\/navigation.js.<\/p>\n<p>It is more common to see JavaScript errors originating from custom code or plugins. If you see the error is coming from a plugin directory try disabling that plugin.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/javascript-error-source.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16947\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/javascript-error-source.png?cdn\" alt=\"javascript-error-source\" width=\"1121\" height=\"735\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/javascript-error-source.png 1121w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/javascript-error-source-300x197.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/javascript-error-source-768x504.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/javascript-error-source-1024x671.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/javascript-error-source-125x82.png 125w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2016\/05\/javascript-error-source-75x49.png 75w\" sizes=\"auto, (max-width: 1121px) 100vw, 1121px\" \/><\/a><\/p>\n<h3>Final Notes<\/h3>\n<p>Debugging JavaScript errors takes practice and experience.<\/p>\n<p>The fastest and easiest\u00a0way to locate\u00a0JavaScript errors is to disable all plugins and see if the error disappears. Then, in order to discover which plugin is causing the problem,\u00a0enable plugins one by one until the problem returns. You will need to notify the plugin author of the error if you want to continue using it.<\/p>\n<p>If the error message is still present even when all plugins are disabled then the error will most likely be originating from your theme. Try switching themes to see if the error disappears. If it does, you will need to contact your theme author for assistance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript errors on your site can stop Max Mega Menu (and other plugins) from behaving correctly. Symptoms include: Front End Click Event not working Mobile Toggle not working Sticky Menu not working Back End Theme Editor tabs not working Save button not working Blue Mega Menu button not appearing Color&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"ht-kb-category":[14],"ht-kb-tag":[],"class_list":["post-16936","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-faqs"],"uagb_featured_image_src":[],"uagb_author_info":{"display_name":"Tom Hemsley","author_link":"https:\/\/www.megamenu.com\/author\/megamenu\/"},"uagb_comment_info":0,"uagb_excerpt":"JavaScript errors on your site can stop Max Mega Menu (and other plugins) from behaving correctly. Symptoms include: Front End Click Event not working Mobile Toggle not working Sticky Menu not working Back End Theme Editor tabs not working Save button not working Blue Mega Menu button not appearing Color...","_links":{"self":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/16936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/comments?post=16936"}],"version-history":[{"count":5,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/16936\/revisions"}],"predecessor-version":[{"id":205479,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/16936\/revisions\/205479"}],"wp:attachment":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/media?parent=16936"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-category?post=16936"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-tag?post=16936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}