{"id":513,"date":"2023-11-15T08:01:32","date_gmt":"2023-11-15T08:01:32","guid":{"rendered":"https:\/\/locationweather.io\/docs\/?post_type=docs&#038;p=513"},"modified":"2025-06-04T10:40:31","modified_gmt":"2025-06-04T10:40:31","slug":"troubleshooting-javascript-errors","status":"publish","type":"docs","link":"https:\/\/locationweather.io\/docs\/troubleshooting-javascript-errors\/","title":{"rendered":"Troubleshooting JavaScript Errors"},"content":{"rendered":"\n<p>If you\u2019re viewing this document, you\u2019ve likely encountered some sort of Javascript issue. Go through the step-by-step guide below to find out the error and go for a solution.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Why Detecting Them Is Useful?<\/strong><\/h4>\n\n\n\n<p>Checking these errors will be one of the first things technical support will work on.&nbsp;<\/p>\n\n\n\n<p>So, even if you are not tech-savvy, following these steps can be useful as you will retrieve valuable information that can result in quickly fixing eventual issues.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Debugging: Step by Step<\/strong><\/h4>\n\n\n\n<p>These steps should be taken in strict order. Make sure to take note of all results.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Test Different Browsers<\/strong><\/h5>\n\n\n\n<p>To begin isolating the problem, try different browsers \u2013 Chrome, Safari, Internet Explorer, Edge, Mozilla Firefox, etc.<\/p>\n\n\n\n<p>If the problem happens only with certain browsers, it\u2019s likely there is a compatibility issue. However, if all browsers present the error, another underlying issue exists.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Enable SCRIPT_DEBUG<\/strong><\/h5>\n\n\n\n<p>Script Debug is a feature that forces WordPress to use the complete versions of some core CSS and JavaScript files rather than the minified versions that are normally loaded. <a href=\"https:\/\/wordpress.org\/documentation\/article\/debugging-in-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">More information on script debugging<\/a>.&nbsp;<\/p>\n\n\n\n<p>To enable it, open the wp-config.php and add the following line before \u201cThat\u2019s all, stop editing! Happy blogging\u201d, as highlighted define(&#8216;SCRIPT_DEBUG&#8217;, true);<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e6509059cab&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69e6509059cab\" class=\"wp-block-image size-full wp-lightbox-container\"><img decoding=\"async\" width=\"705\" height=\"322\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/locationweather.io\/docs\/wp-content\/uploads\/2023\/11\/WooGallery-Debug-True.png\" alt=\"\" class=\"wp-image-1794\" srcset=\"https:\/\/locationweather.io\/docs\/wp-content\/uploads\/2023\/11\/WooGallery-Debug-True.png 705w, https:\/\/locationweather.io\/docs\/wp-content\/uploads\/2023\/11\/WooGallery-Debug-True-300x137.png 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p>Now, refresh WordPress and check if the problem persists.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Diagnosis<\/strong><\/h4>\n\n\n\n<p>Every browser has a feature that shows the error console, in which you can find more specific information about JavaScript. An example of an error as reported in the Chrome Console:<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e650905a223&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69e650905a223\" class=\"wp-block-image size-full wp-lightbox-container\"><img decoding=\"async\" width=\"911\" height=\"79\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/locationweather.io\/docs\/wp-content\/uploads\/2023\/11\/image-10.png\" alt=\"\" class=\"wp-image-737\" srcset=\"https:\/\/locationweather.io\/docs\/wp-content\/uploads\/2023\/11\/image-10.png 911w, https:\/\/locationweather.io\/docs\/wp-content\/uploads\/2023\/11\/image-10-300x26.png 300w, https:\/\/locationweather.io\/docs\/wp-content\/uploads\/2023\/11\/image-10-768x67.png 768w\" sizes=\"(max-width: 911px) 100vw, 911px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p>Each error console has a slightly different interface, and the way to activate it also changes. Learn more about each:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developers.google.com\/web\/tools\/chrome-devtools\/console\/\" target=\"_blank\" rel=\"noreferrer noopener\">Chrome Error Console<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Tools\/Web_Console\" target=\"_blank\" rel=\"noreferrer noopener\">Firefox Web Console<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/previous-versions\/\/dd565625(v=vs.85)\" target=\"_blank\" rel=\"noreferrer noopener\">Internet Explorer Debugging Script<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/support.apple.com\/guide\/safari\/use-the-developer-tools-in-the-develop-menu-sfri20948\/mac\" target=\"_blank\" rel=\"noreferrer noopener\">Safari Develop Menu<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/help.opera.com\/en\/presto\/advanced-features\/#errorconsole\" target=\"_blank\" rel=\"noreferrer noopener\">Opera Error Console<\/a><\/li>\n<\/ul>\n\n\n\n<p>Copy this information. It should include the error, its location, and its context.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Report<\/strong><\/h4>\n\n\n\n<p>Combine all the information that you have gathered and present it. The more complete it is, the more you will assist the technical support.<\/p>\n","protected":false},"parent":0,"menu_order":81,"template":"","docs_cat":[8],"class_list":["post-513","docs","type-docs","status-publish","hentry","docs_cat-troubleshooting"],"taxonomy_info":{"docs_cat":[{"value":8,"label":"Troubleshooting"}]},"featured_image_src_large":[],"author_info":[],"comment_info":"","_links":{"self":[{"href":"https:\/\/locationweather.io\/docs\/wp-json\/wp\/v2\/docs\/513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/locationweather.io\/docs\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/locationweather.io\/docs\/wp-json\/wp\/v2\/types\/docs"}],"version-history":[{"count":8,"href":"https:\/\/locationweather.io\/docs\/wp-json\/wp\/v2\/docs\/513\/revisions"}],"predecessor-version":[{"id":1795,"href":"https:\/\/locationweather.io\/docs\/wp-json\/wp\/v2\/docs\/513\/revisions\/1795"}],"wp:attachment":[{"href":"https:\/\/locationweather.io\/docs\/wp-json\/wp\/v2\/media?parent=513"}],"wp:term":[{"taxonomy":"docs_cat","embeddable":true,"href":"https:\/\/locationweather.io\/docs\/wp-json\/wp\/v2\/docs_cat?post=513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}