shopify常见问题和问题解决方案介绍-ESG跨境

shopify常见问题和问题解决方案介绍

shopify新闻
shopify新闻
2022-03-28
点赞icon 0
查看icon 1341

如果您在使用模板编辑器时遇到了问题,请查看下面是否列出了您的问题。

问题排查

如果您在使用模板编辑器时遇到了问题,请查看下面是否列出了您的问题。

问题:加载页面失败

页面正到不受支持的 URL

如果您的店面包含将用户重定向到未与您的商店相连接的 URL 的代码,请在使用模板编辑器时确认此重定向已被禁用。

例如,为了根据买家所在的地点将他们定向到不同的 商店,此类型的重定向可能会被添加到店面上。此类型的重定向代码可能存在于您的模板或安装的应用中。

为了确保您的重定向不会影响编辑器体验,请在您模板的 JavaScript 代码中将 window.location.href = 替换为 window.parent.location.href =。如果无法执行此操作,则在使用模板编辑器时在 JavaScript 中使用对 window.Shofy.designMode 变量的引用来禁用此重定向。当店面加载到编辑器中时,此变量将设置为 true;如果未加载,此变量将设置为 false

由于出现错误,页面无法加载

由于多种原因,页面无法加载到模板编辑器中。常见问题包括以下内容:

  • 网络连接问题

  • 模板中的 Liquid 代码无效

如果您已验证这些问题不会导致错误,请尝试通过导航到模板编辑器中的模板操作 > 预览模板来访问您的在线商店。如果页面无法加载,您可以联系 Shopify 支持以获取有关您店面的帮助。

出现 HTML 错误

在模板编辑器中更改模板设置时,您可能会在编辑器中看到“发现 HTML 错误”警告消息:

当您的模板代码中存在语法错误时,会显示此错误消息。若要解决此问题,您可以检查错误消息中引用的 Liquid 文件中的代码。在上方的示例中,此代码为 slideshow.liquid

查找模板代码中的问题

  1. 点击链接到错误消息的 .liquid 分区文件。这会将您定向到编辑 HTML/CSS 页面,并且文件将在代码编辑器中打开。

  2. 仔细查看文件中的代码,并尝试找到无效的 HTML 或 Liquid。代码编辑器将用红色显示潜在的语法错误。常见问题如下:

    • 额外的结束 HTML 标记,例如,结束 </div> 没有对应的开始 <div>

    • 额外的开始 HTML 标记,例如,开始 <div> 没有对应的结束 </div>

    • HTML 标记格式错误,例如,<div  缺少 >

    • Liquid 代码格式错误

    • 包含的模板代码片段文件中的 HTML 已损坏

  3. 找到问题后,更正您的模板文件中的代码。

  4. 点击保存

  5. 点击自定义以返回模板编辑器,并确认错误消息已消失。

其他解决方案

如果您无法按照前面的步骤解决问题,请考虑以下选项:

  • 回退到旧版模板文件

  • 从模板商店中安装新版模板并切换到该版本

  • 了解您的模板提供的支持类型

Troubleshooting

If you are experiencing issues with your theme editor, then check if your issue appears below.

Common issues

Issue: Failed to load the page

Page is redirecting to an unsupported URL

If your storefront includes code that redirects users to URLs that are not connected to your shop, then verify that the redirect has been disabled when you visit the theme editor.

For example, this type of redirect may be added to a storefront in order to direct buyers to different Shopify stores depending on their location. This type of redirect code could exist in either your theme or an app that you installed.

To ensure your redirect does not interfere with the editor experience, replace window.location.href = with window.parent.location.href = in your theme’s JavaScript code. If that is not possible, use a reference to the window.Shopify.designMode variable in JavaScript to disable the redirect when you visit the theme editor. This variable is set to true when the storefront is loaded in the editor and false when it is not.

Page failed to load due to an error

A page can fail to load in the theme editor for many reasons. Common issues include the following:

  • network connection issues

  • invalid Liquid code in your theme

If you have verified that these issues are not causing the error, then try visiting your online store by navigating to Theme actions > Preview theme in the theme editor. If the page fails to load, then you can contact Shopify support for help with your storefront.

HTML error found

When making changes to your theme settings in the theme editor, you might see an 'HTML error found' warning message in the editor:


This error message appears when a syntax error is found in your theme . To resolve the problem, you can examine the code in the Liquid file that is referenced in the error message. In the example above, this would be the slideshow.liquid.

Finding the problem in your theme code

  1. Click on the .liquid section file that is linked to in the error message. This will take you to the Edit HTML/CSS page, and the file will open in the code editor.

  2. Look through the code in the file and try to find invalid HTML or Liquid. The code editor will show potential syntax errors in red. Common problems include the following:

    • Extra closing HTML tags, for example, a closing </div> without an opening <div>

    • Extra unclosed HTML tags, for example, an opening <div> without a closing </div>

    • Malformed HTML tags, for example, <div  without a >

    • Malformed Liquid code

    • Broken HTML in an included theme snippet file

  3. Once you've found the problem, correct the code in your theme file.

  4. Click Save.

  5. Click Customize to return to the theme editor, and confirm that the error message is gone.

Other solutions

If you are unable to resolve the problem by following the previous steps, then consider the following options:

  • Roll back to an older version of your theme file

  • Install and switch to new version of the theme from the Theme Store

  • Find out what kind of support is available for your theme



特别声明:以上文章内容仅代表作者本人观点,不代表ESG跨境电商观点或立场。如有关于作品内容、版权或其它问题请于作品发表后的30日内与ESG跨境电商联系。

搜索 放大镜
韩国平台交流群
加入
韩国平台交流群
扫码进群
欧洲多平台交流群
加入
欧洲多平台交流群
扫码进群
美国卖家交流群
加入
美国卖家交流群
扫码进群
ESG跨境专属福利分享群
加入
ESG跨境专属福利分享群
扫码进群
拉美电商交流群
加入
拉美电商交流群
扫码进群
亚马逊跨境增长交流群
加入
亚马逊跨境增长交流群
扫码进群
《开店大全-全球合集》
《开店大全-主流平台篇》
《开店大全-东南亚篇》
《CD平台自注册指南》
《开店大全-俄罗斯篇》
《韩国站内推广指南》
《韩国热销品预测》
《开店大全-日韩篇》
《开店大全-拉美篇》
《开店大全-欧洲篇》
通过ESG入驻平台,您将解锁
绿色通道,更高的入驻成功率
专业1v1客户经理服务
运营实操指导
运营提效资源福利
平台官方专属优惠
联系顾问

平台顾问

平台顾问 平台顾问

微信扫一扫
马上联系在线顾问

icon icon

小程序

微信小程序

ESG跨境小程序
手机入驻更便捷

icon icon

返回顶部