Liquid, JavaScript, themes, sales channels
source problem page
https://shop.dermagevity.com/products/eyelastin
I have a script fragment that used to be an app which was removed. Shopify still thinks it is live, so runs it and gets a 404 on the called resource - tmpopup.js
<script>(function() { function asyncLoad() { var urls = ["https:\/\/d16x9pmufyvewt.cloudfront.net\/tmpopup.js?shop=dermagevity.myshopify.com","https:\/\/omnisrc.com\/inShop\/Embed\/shopify.js?shop=dermagevity.myshopify.com","https:\/\/www.stilyoapps.com\/reconvert\/assets\/js\/store_reconvert.js?shop=dermagevity.myshopify.com"]; for (var i = 0; i < urls.length; i++) { var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src=urls[i]; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); } }; if(window.attachEvent) { window.attachEvent('onload', asyncLoad); } else { window.addEventListener('load', asyncLoad, false); } })();</script>
It loads in the head section. I assume that shopify injects the code because the other two apps are in my app dashboard, and this script doesn't exist in my theme files.
Frankly I am sick of dealing with unresponsive app developers, and I reckon this is a shopify issue not an app dev issue anyway.
Any help appreciated in figuring this out
Thanks
Rick
Solved! Go to the solution
This is an accepted solution.
Fixed it. Hired a dev.
Hi Rick,
Did you check the content of theme.liquid file?
Can you posted them here?
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Contents of Theme.liquid
<!doctype html>
<!--[if IE 9]> <html class="ie9 no-js{% if settings.box_layout %} is-boxed{% endif %}" lang="{{ shop.locale }}"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js{% if settings.box_layout %} is-boxed{% endif %}" lang="{{ shop.locale }}"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="{{ canonical_url }}">
{%- if settings.favicon != blank -%}
<link rel="shortcut icon" href="{{ settings.favicon | img_url: '32x32' }}" type="image/png">
{%- endif -%}
{%- if settings.favicon_retina != blank -%}
<link rel="apple-touch-icon-precomposed" href="{{ settings.favicon_retina | img_url: '152x152' }}" type="image/png">
{%- endif -%}
{%- capture seo_title -%}
{{- page_title -}}
{%- if current_tags -%}
{%- assign meta_tags = current_tags | join: ', ' %} – {{ 'general.meta.tags' | t: tags: meta_tags -}}
{%- endif -%}
{%- if current_page != 1 -%}
– {{ 'general.meta.page' | t: page: current_page }}
{%- endif -%}
{%- unless page_title contains shop.name -%}
– {{ shop.name }}
{%- endunless -%}
{%- endcapture -%}
<title>{{ seo_title }}</title>
{%- if page_description -%}
<meta name="description" content="{{ page_description | escape }}">
{%- endif -%}
{%- include 'social-meta-tags' -%}
{%- include 'shopify-head-tag' -%}
{%- include 'weketing-tracking' -%}
{{ content_for_header }}
<!-- Google Tag Manager instal high in head-->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-W6CG73R');</script>
<!-- End Google Tag Manager -->
<script type="application/javascript">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'10074265'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!="complete"&&rs!="loaded"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,"script","https://s.yimg.com/wi/ytc.js","dotq");</script>
<!-- luckyorange -->
<script type='text/javascript'>
window.__lo_site_id = 138325;
(function() {
var wa = document.createElement('script'); wa.type = 'text/javascript'; wa.async = true;
wa.src='https://d10lpsik1i8c69.cloudfront.net/w.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wa, s);
})();
</script>
<!--Lazy Loading -->
{{ "lazysizes.min.js" | asset_url | script_tag }}
<style>.lazyload,.lazyloading{opacity:0}.lazyloaded{opacity:1;transition:opacity.3s}</style>
</head>
{%- assign default_rtl_support = settings.rtl_support -%}
{%- assign default_catalog_mode = settings.catalog_mode -%}
{%- if settings.roar_themedemo -%}
{%- capture shop_demo -%}{% include 'querystring', name: 'type' %}{%- endcapture -%}
{%- if shop_demo == 'catalog-mode' -%}{% assign default_catalog_mode = true %}{%- endif -%}
{%- endif -%}
<body class="template-{{ template | split: '.' | first }}{% if default_rtl_support %} is-rtl{% endif %}{% if default_catalog_mode %} is-catalog_mode{% endif %}">
<!-- Google Tag Manager (noscript) paste immediatley after body tag -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W6CG73R"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="site-loader"></div>
<div id="site-container">
{%- include 'global-symbols' -%}
{%- include 'age-check' -%}
{%- section 'header-mobile' -%}
{%- section 'header' -%}
{%- section 'header-menu' -%}
{%- section 'header-menu-vertical' -%}
<hr style="height: 2px; background-color: #1d96e8;">
<main class="site-main" role="main">
{{ content_for_layout }}
</main>
{%- section 'footer' -%}
{%- section 'copyright' -%}
</div>
{%- include 'theme-demo' -%}
{%- include 'photoswipe' -%}
<div id="weketing_google_translate_element" class="hide"></div>
</body>
</html>
This is an accepted solution.
Fixed it. Hired a dev.
Same problem, but I can't see the solution here
this function
function asyncLoad()
is loaded in {{ content_for_header }} in your theme.liquid header.
This function is being used to load app script after the "onload" event. Deleting the app should remove the offending entry.
Alternatively, you can do it manually by replacing {{ content_for_header }} with this:
{% capture modified_content_for_header %}{{ content_for_header }}{% endcapture %}
{% assign modified_content_for_header = modified_content_for_header | remove: '"https:\/\/d16x9pmufyvewt.cloudfront.net\/tmpopup.js?shop=dermagevity.myshopify/com",' %}
{{ modified_content_for_header }}
You marked your answer as a solution but it does not contain the solution. This is misleading and does not help anyone else who is stumbling upon this page experiencing the same issue.
To anyone who is still wondering what vendor this mysterious script belongs to, it is Lucky Orange.
Hey Rrakausk - also having a problem with this script interfering with apps on our shopfiy store. You said you got a developer that solved the issue. Could you share their contact info with me please?
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024