{"id":962,"date":"2012-11-06T08:43:46","date_gmt":"2012-11-06T08:43:46","guid":{"rendered":"http:\/\/www.bennewitz.com\/devel\/?p=962"},"modified":"2014-01-29T14:28:37","modified_gmt":"2014-01-29T14:28:37","slug":"magento-javascript-merge-and-mod-pagespeed","status":"publish","type":"post","link":"https:\/\/www.bennewitz.com\/devel\/magento-javascript-merge-and-mod-pagespeed\/","title":{"rendered":"Magento, merge Javascript and mod-pagespeed"},"content":{"rendered":"<p>Within the last days I got an ugly Javascript error (missing &#8216;;&#8217; at line 25619), only using MSIE 8 for Magento&#8217;s detailed product view&#8230; Thinking about the latest changes done I was able to find the reason: \u00a0It was a combination of the enabled Javascript merge function of Magento together with Google&#8217;s mod-pagespeed extension for Apache.<\/p>\n<p>The line number 25619 of the merged Javascript file was in reality line number 564 of js\/varien\/product.js&#8230;<\/p>\n<p>There we have this:<\/p>\n<p style=\"text-align: left; padding-left: 60px;\">this.skipCalculate = config.skipCalculate;\/\/@deprecated after 1.5.1.0<\/p>\n<p>The comment on this line is problematic for MSIE and the setting, described on top, I think especially the &#8216;@&#8217; was the reason for the error.<\/p>\n<p>I have removed the comment completely:<\/p>\n<p style=\"text-align: left; padding-left: 60px;\">this.skipCalculate = config.skipCalculate;<\/p>\n<p>The error is gone now even with Magento&#8217;s Javascript merging enabled. \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Within the last days I got an ugly Javascript error (missing &#8216;;&#8217; at line 25619), only using MSIE 8 for Magento&#8217;s detailed product view&#8230; Thinking [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":["post-962","post","type-post","status-publish","format-standard","hentry","category-virtual-mirror-and-magento"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/posts\/962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/comments?post=962"}],"version-history":[{"count":0,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/posts\/962\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/media?parent=962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/categories?post=962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/tags?post=962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}