{"id":52715,"date":"2015-08-24T07:09:24","date_gmt":"2015-08-24T11:09:24","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=52715"},"modified":"2016-02-18T08:41:09","modified_gmt":"2016-02-18T13:41:09","slug":"magento-troubleshooter-merge-javascript-option-issues","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/magento-troubleshooter-merge-javascript-option-issues.html","title":{"rendered":"Magento Troubleshooter. Merge JavaScript option issues"},"content":{"rendered":"<p>\r\n<p>Hello! This video tutorial shows how to fix issues which occur after the <strong>&#8220;Merge JavaScript Files&#8221;<\/strong> option is enabled in your Magento store.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=_JpT3GmrhpY?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento Troubleshooter. Merge javascript option issues<\/a><\/p>\r\n<p>The <strong>&#8220;Merge JavaScript Files&#8221;<\/strong> option may improve the site load speed by <strong>combining Javascript<\/strong> into fewer files and compressing them.<\/p>\r\n<p>There are some issues with the scripted elements of the template, such as user menu, categories menu, language and currency switchers etc. that may occur when the <strong>&#8220;Merge JavaScript Files&#8221;<\/strong> option is enabled in your admin panel:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_1-300x160.png\" alt=\"magento_merge_javascript_files_option_issues_1\" width=\"300\" height=\"160\" class=\"aligncenter size-medium wp-image-52716\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_1-300x160.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_1-150x80.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_1-1024x546.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_1.png 1275w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>Let&#8217;s learn how to resolve these issues on the example of the menu.<\/p>\r\n<ol>\r\n<li>\r\n<p>Locate the <strong>superfish.js <\/strong>file in the<strong> \/skin\/frontend\/tm_themes\/themeXXX\/js\/<\/strong> directory via <strong>FTP\/hosting control panel File Manager<\/strong>:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_2-300x180.png\" alt=\"magento_merge_javascript_files_option_issues_2\" width=\"300\" height=\"180\" class=\"aligncenter size-medium wp-image-52717\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_2-300x180.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_2-150x90.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_2-1024x615.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_2.png 1155w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Open the file for editing and find the following piece of code:<\/p>\r\n<\/li>\r\n<\/ol>\r\n<pre class=\"brush:js\">;(function ($)<\/pre>\r\n<p>Simply add an <strong>exclamation mark (!)<\/strong> before the function so it looks as follows:<\/p>\r\n<pre class=\"brush:js\">;!(function ($)<\/pre>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_3.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_3-300x163.png\" alt=\"magento_merge_javascript_files_option_issues_3\" width=\"300\" height=\"163\" class=\"aligncenter size-medium wp-image-52718\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_3-300x163.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_3-150x82.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_3-1024x558.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_merge_javascript_files_option_issues_3.png 1147w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>Do not forget to save the file to see the changes. You may also need to <a href=\"\/help\/how-to-clear-magento-cache.html\" target=\"_blank\">clear Magento cache<\/a> for the changes to apply.<\/p>\r\n<p>Navigate to your store front-end and refresh the page. You can see the menu functions properly now.<\/p>\r\n<p>This is the end of the tutorial, you have learnt how to fix issues which occur after the &#8220;Merge JavaScript Files&#8221; option is enabled in your Magento store.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=_JpT3GmrhpY?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento Troubleshooter. Merge javascript option issues<\/a><\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This video tutorial shows how to fix issues which occur after the <strong>&#8220;Merge JavaScript Files&#8221;<\/strong> option is enabled in your Magento store.<\/p>\n","protected":false},"author":68,"featured_media":52720,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[729],"tags":[1373,1015,2407,2047,785],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/52715"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=52715"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/52715\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/52720"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=52715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=52715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=52715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}