• Hi there,
    we have the Problem that our Page doesn`t render on IE11 wehen combining JS-Files is activated. When I add “?ao_noptimize=1″ to the URL it works.

    I did take look on the console which tells me:

    SCRIPT1002: Syntaxfehler
    Datei: autoptimize_3c22b0bfb252bb68addf797460a56e61.js, Zeile: 7, Spalte: 804

    which is the following script:

    try{function addNamesAndSkusToTrustboxes(){const t=trustbox_settings.sku||””,s=trustbox_settings.name||””,o=[t];for(var e in trustpilot_trustbox_settings.trustboxes)trustpilot_trustbox_settings.trustboxes[e].sku=o.join(“,”),trustpilot_trustbox_settings.trustboxes[e].name=s}function renderTrustboxes(){const t=trustbox_settings.page||””;”product”===t&&addNamesAndSkusToTrustboxes(),trustpilot_trustbox_settings.trustboxes=trustpilot_trustbox_settings.trustboxes.filter(function(s){return t===s.page||trimTrailingSlashes(s.page)===trimTrailingSlashes(location.origin+location.pathname)||s.page===btoa(location.origin+location.pathname).toLowerCase()||s.page===btoa(trimTrailingSlashes(location.origin+location.pathname)).toLowerCase()}),”complete”!==document.readyState&&window.addEventListener(“load”,()=>{tp(“trustBox”,trustpilot_trustbox_settings)}),tp(“trustBox”,trustpilot_trustbox_settings)}function trimTrailingSlashes(t){return”string”==typeof t?t.replace(/\/+$/,””):t}renderTrustboxes();

    What do i have to enter to exclude this script?

    P.S. I am not that familiar with JS yet but willing to learn.

    best regards,

    Flo

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Can you try adding wp-content/plugins/trustpilot-reviews to the comma-separated JS optimization exclusion list?

    Thread Starter iphonedisplayshop

    (@iphonedisplayshop)

    Tried it out, but it didn’t work.
    We integrated those Trustpilot widgets not just via the Plugin. We also integrated them manually with a Code-Snippet.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Tried it out, but it didn’t work.

    hmmm … exact same error referencing same script?

    Thread Starter iphonedisplayshop

    (@iphonedisplayshop)

    Nope,
    now the Problem also appears in Chrome.

    Thats what the console says:
    DOM7011: Der Code auf dieser Seite hat die Zwischenspeicherung für das Vor- und Zurücknavigieren deaktiviert. Weitere Informationen dazu finden Sie unter: https://go.microsoft.com/fwlink/?LinkID=291337
    Datei: https://www.iphonedisplayreparatur.com
    HTML1300: Navigation wurde ausgeführt.
    Datei: https://www.iphonedisplayreparatur.com
    HTML1423: Falsch formatierte Startmarkierung. Attribute sollten durch Leerzeichen getrennt werden.
    Datei: https://www.iphonedisplayreparatur.com, Zeile: 115, Spalte: 56984
    HTML1409: Ungültiges Attributnamenzeichen. Attributnamen sollten nicht (“),(‘),(<) oder (=) enthalten.
    Datei: https://www.iphonedisplayreparatur.com, Zeile: 115, Spalte: 56984
    HTML1500: Die Markierung kann nicht selbstschlie?end sein. Verwenden Sie eine explizite schlie?ende Markierung.
    Datei: https://www.iphonedisplayreparatur.com, Zeile: 115, Spalte: 105267
    HTML1500: Die Markierung kann nicht selbstschlie?end sein. Verwenden Sie eine explizite schlie?ende Markierung.
    Datei: https://www.iphonedisplayreparatur.com, Zeile: 115, Spalte: 136728
    HTML1503: Unerwartete Startmarkierung.
    Datei: https://www.iphonedisplayreparatur.com, Zeile: 115, Spalte: 147777
    SCRIPT1002: Syntaxfehler
    Datei: trustBoxScript.min.js, Zeile: 1, Spalte: 800
    SCRIPT1009: ‘}’ erwartet
    Datei: autoptimize_07fe37d9266bb72ffd50ffa916aeacf4.js, Zeile: 331, Spalte: 3515

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, most are irrelavant here, but;

    SCRIPT1002: Syntaxfehler
    Datei: trustBoxScript.min.js, Zeile: 1, Spalte: 800

    seems to indicate there is a problem with trustbox(Script) in IE11

    SCRIPT1009: ‘}’ erwartet
    Datei: autoptimize_07fe37d9266bb72ffd50ffa916aeacf4.js, Zeile: 331, Spalte: 3515

    so what JS is on (around) line 331 character 3515?

    Thread Starter iphonedisplayshop

    (@iphonedisplayshop)

    ({type:”jet-popup-open-trigger”,popupData:{popupId:”jet-popup-“+o}})}};d(window).on(“elementor/frontend/init”,i.init)}(jQuery,window.elementorFrontend);}catch(e){}

    Character 3515 is inbetween the last brace.So character 3516 is the last character in that script!

    btw. thanks for that awsome fast support!

    Thread Starter iphonedisplayshop

    (@iphonedisplayshop)

    Here ist the complete Line 331:

    try{!function(d,o){“use strict”;var i={init:function(){var e={“jet-single-images.default”:i.productImages,”jet-single-add-to-cart.default”:i.addToCart,”jet-single-tabs.default”:i.productTabs,”jet-woo-products.default”:i.widgetProducts,”jet-woo-categories.default”:i.widgetCategories};d.each(e,function(e,t){o.hooks.addAction(“frontend/element_ready/”+e,t)}),d(document).on(“jet-filter-content-rendered”,i.reInitCarousel),o.hooks.addFilter(“jet-popup/widget-extensions/popup-data”,i.prepareJetPopup),d(window).on(“jet-popup/render-content/ajax/success”,i.jetPopupLoaded),d(document).on(“wc_update_cart added_to_cart”,i.jetCartPopupOpen)},jetPopupLoaded:function(e,t){setTimeout(function(){d(window).trigger(“resize”),d(“.jet-popup .woocommerce-product-gallery.images”).each(function(e){d(this).wc_product_gallery()})},500)},prepareJetPopup:function(e,t,o,i){var a;t[“is-jet-woo-builder”]&&(e.isJetWooBuilder=!0,e.templateId=t[“jet-woo-builder-qv-template”],(a=o.hasClass(“elementor-widget-jet-woo-products”)||o.hasClass(“elementor-widget-jet-woo-products-list”)?d(i.target).parents(“.jet-woo-builder-product”):o.parents(“.jet-woo-builder-product”)).length&&(e.productId=a.data(“product-id”)));return e},productImages:function(e){e.find(“.jet-single-images__loading”).remove(),d(“body”).hasClass(“single-product”)||e.find(“.woocommerce-product-gallery”).each(function(){d(this).wc_product_gallery()})},addToCart:function(e){d(“body”).hasClass(“single-product”)||”undefined”!=typeof wc_add_to_cart_variation_params&&e.find(“.variations_form”).each(function(){d(this).wc_variation_form()})},productTabs:function(e){if(e.find(“.jet-single-tabs__loading”).remove(),!d(“body”).hasClass(“single-product”)){var t=window.location.hash,o=window.location.href,i=e.find(“.wc-tabs, ul.tabs”).first();i.find(“a”).addClass(“elementor-clickable”),e.find(“.wc-tab, .woocommerce-tabs .panel:not(.panel .panel)”).hide(),0<=t.toLowerCase().indexOf(“comment-“)||”#reviews”===t||”#tab-reviews”===t?i.find(“li.reviews_tab a”).click():0<o.indexOf(“comment-page-“)||0<o.indexOf(“cpage=”)?i.find(“li.reviews_tab a”).click():”#tab-additional_information”===t?i.find(“li.additional_information_tab a”).click():i.find(“li:first a”).click()}},widgetProducts:function(e){var t=e.find(“.jet-woo-carousel”);t.length&&i.initCarousel(t.find(“.jet-woo-products”),t.data(“slider_options”))},widgetCategories:function(e){var t=e.find(“.jet-woo-carousel”);t.length&&i.initCarousel(t.find(“.jet-woo-categories”),t.data(“slider_options”))},reInitCarousel:function(e,t){i.widgetProducts(t)},initCarousel:function(e,t){var o,i,a,n;o=t.slidesToShow.tablet?t.slidesToShow.tablet:1===t.slidesToShow.desktop?1:2,i=t.slidesToShow.mobile?t.slidesToShow.mobile:1,t.slidesToShow=t.slidesToShow.desktop,a={customPaging:function(e,t){return d(“<span />”).text(t+1)},dotsClass:”jet-slick-dots”,responsive:[{breakpoint:1025,settings:{slidesToShow:o}},{breakpoint:768,settings:{slidesToShow:i,slidesToScroll:1}}]},n=d.extend({},a,t),e.slick(n)},jetCartPopupOpen:function(e){var t=d(e.currentTarget.activeElement).parents(“.jet-woo-products, .jet-woo-products-list, .jet-woo-builder-archive-add-to-cart”).data(“cart-popup-enable”),o=d(e.currentTarget.activeElement).parents(“.jet-woo-products, .jet-woo-products-list, .jet-woo-builder-archive-add-to-cart”).data(“cart-popup-id”);o=d(o)[0],t&&d(window).trigger({type:”jet-popup-open-trigger”,popupData:{popupId:”jet-popup-“+o}})}};d(window).on(“elementor/frontend/init”,i.init)}(jQuery,window.elementorFrontend);}catch(e){}

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, can you:
    * disable “try/catch wrapping” in AO JS opt.?
    * if not OK yet also try adding wp-content/plugins/jet-woo-builder/ to the JS exclusions?

    Thread Starter iphonedisplayshop

    (@iphonedisplayshop)

    Ok. Did it with both.

    Now this appears:

    SCRIPT5042: Nicht definierte Variable im strict-Modus.
    Datei: autoptimize_402b5a3fc63c66ea01675b35519a4df3.js, Zeile: 86, Spalte: 15766

    UAELVideo={_play:function(t){var a=e(“<iframe/>”),i=t.data(“src”);0==t.find(“iframe”).length&&(a.attr(“src”,i),a.attr(“frameborder”,”0″),a.attr(“allowfullscreen”,”1″),a.attr(“allow”,”autoplay;encrypted-media;”),t.html(a)),t.closest(“.uael-video__outer-wrap”).find(“.uael-vimeo-wrap”).hide()}

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    phew …

    try wp-content/plugins/ultimate-elementor/assets/min-js/uael-frontend.min.js or wp-content/plugins/ultimate-elementor/assets/min-js/ or wp-content/plugins/ultimate-elementor/ ?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘IE11 Syntax Error when combining JS-Files’ is closed to new replies.