shopify常見問題和問題解決方案介紹-ESG跨境

shopify常見問題和問題解決方案介紹

shopify新聞
shopify新聞
2022-03-28
點贊icon 0
查看icon 1651

如果您在使用模板編輯器時遇到了問題,請查看下面是否列出了您的問題。

問題排查

如果您在使用模板編輯器時遇到了問題,請查看下面是否列出了您的問題。

問題:加載頁面失敗

頁面正到不受支持的 URL

如果您的店面包含將用戶重定向到未與您的商店相連接的 URL 的代碼,請在使用模板編輯器時確認(rèn)此重定向已被禁用。

例如,為了根據(jù)買家所在的地點將他們定向到不同的 商店,此類型的重定向可能會被添加到店面上。此類型的重定向代碼可能存在于您的模板或安裝的應(yīng)用中。

為了確保您的重定向不會影響編輯器體驗,請在您模板的 JavaScript 代碼中將 window.location.href = 替換為 window.parent.location.href =。如果無法執(zhí)行此操作,則在使用模板編輯器時在 JavaScript 中使用對 window.Shofy.designMode 變量的引用來禁用此重定向。當(dāng)?shù)昝婕虞d到編輯器中時,此變量將設(shè)置為 true;如果未加載,此變量將設(shè)置為 false。

由于出現(xiàn)錯誤,頁面無法加載

由于多種原因,頁面無法加載到模板編輯器中。常見問題包括以下內(nèi)容:

  • 網(wǎng)絡(luò)連接問題

  • 模板中的 Liquid 代碼無效

如果您已驗證這些問題不會導(dǎo)致錯誤,請嘗試通過導(dǎo)航到模板編輯器中的模板操作 > 預(yù)覽模板來訪問您的在線商店。如果頁面無法加載,您可以聯(lián)系 Shopify 支持以獲取有關(guān)您店面的幫助。

出現(xiàn) HTML 錯誤

在模板編輯器中更改模板設(shè)置時,您可能會在編輯器中看到“發(fā)現(xiàn) HTML 錯誤”警告消息:

當(dāng)您的模板代碼中存在語法錯誤時,會顯示此錯誤消息。若要解決此問題,您可以檢查錯誤消息中引用的 Liquid 文件中的代碼。在上方的示例中,此代碼為 slideshow.liquid

查找模板代碼中的問題

  1. 點擊鏈接到錯誤消息的 .liquid 分區(qū)文件。這會將您定向到編輯 HTML/CSS 頁面,并且文件將在代碼編輯器中打開。

  2. 仔細(xì)查看文件中的代碼,并嘗試找到無效的 HTML 或 Liquid。代碼編輯器將用紅色顯示潛在的語法錯誤。常見問題如下:

    • 額外的結(jié)束 HTML 標(biāo)記,例如,結(jié)束 </div> 沒有對應(yīng)的開始 <div>

    • 額外的開始 HTML 標(biāo)記,例如,開始 <div> 沒有對應(yīng)的結(jié)束 </div>

    • HTML 標(biāo)記格式錯誤,例如,<div  缺少 >

    • Liquid 代碼格式錯誤

    • 包含的模板代碼片段文件中的 HTML 已損壞

  3. 找到問題后,更正您的模板文件中的代碼。

  4. 點擊保存。

  5. 點擊自定義以返回模板編輯器,并確認(rèn)錯誤消息已消失。

其他解決方案

如果您無法按照前面的步驟解決問題,請考慮以下選項:

  • 回退到舊版模板文件

  • 從模板商店中安裝新版模板并切換到該版本

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

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



特別聲明:以上文章內(nèi)容僅代表作者本人觀點,不代表ESG跨境電商觀點或立場。如有關(guān)于作品內(nèi)容、版權(quán)或其它問題請于作品發(fā)表后的30日內(nèi)與ESG跨境電商聯(lián)系。

搜索 放大鏡
韓國平臺交流群
加入
韓國平臺交流群
掃碼進群
歐洲多平臺交流群
加入
歐洲多平臺交流群
掃碼進群
美國賣家交流群
加入
美國賣家交流群
掃碼進群
ESG跨境專屬福利分享群
加入
ESG跨境專屬福利分享群
掃碼進群
拉美電商交流群
加入
拉美電商交流群
掃碼進群
亞馬遜跨境增長交流群
加入
亞馬遜跨境增長交流群
掃碼進群
亞馬遜跨境增長交流群
加入
亞馬遜跨境增長交流群
掃碼進群
拉美電商交流群
加入
拉美電商交流群
掃碼進群
ESG獨家招商-PHH GROUP賣家交流群
加入
ESG獨家招商-PHH GROUP賣家交流群
掃碼進群
《TikTok官方運營干貨合集》
《TikTok綜合運營手冊》
《TikTok短視頻運營手冊》
《TikTok直播運營手冊》
《TikTok全球趨勢報告》
《韓國節(jié)日營銷指南》
《開店大全-全球合集》
《開店大全-主流平臺篇》
《開店大全-東南亞篇》
《CD平臺自注冊指南》
通過ESG入駐平臺,您將解鎖
綠色通道,更高的入駐成功率
專業(yè)1v1客戶經(jīng)理服務(wù)
運營實操指導(dǎo)
運營提效資源福利
平臺官方專屬優(yōu)惠

立即登記,定期獲得更多資訊

訂閱
聯(lián)系顧問

平臺顧問

平臺顧問 平臺顧問

微信掃一掃
馬上聯(lián)系在線顧問

icon icon

小程序

微信小程序

ESG跨境小程序
手機入駐更便捷

icon icon

返回頂部

【免費領(lǐng)取】全球跨境電商運營干貨 關(guān)閉
進行中
進行中
【活動報名】2024年歐洲多藍(lán)海平臺招商沙龍
官方親臨,拆解phh group/eMAG/worten三個平臺商機
立即報名
進行中
進行中
TikTok運營必備干貨包
包含8個TikTok最新運營指南(市場趨勢、運營手冊、節(jié)日攻略等),官方出品,專業(yè)全面!
免費領(lǐng)取
進行中
進行中
韓國電商節(jié)日營銷指南
10+韓國電商重要營銷節(jié)點詳細(xì)解讀;2024各節(jié)日熱度選品助力引爆訂單增長;8大節(jié)日營銷技巧輕松撬動大促流量密碼。
免費領(lǐng)取
進行中
進行中
全球平臺詳解——全球合集
涵括全球100+個電商平臺的核心信息,包括平臺精煉簡介、競爭優(yōu)勢、熱銷品類、入駐要求以及入駐須知等關(guān)鍵內(nèi)容。
立即領(lǐng)取
進行中
進行中
全球平臺詳解——主流平臺篇
火爆全球的跨境電商平臺合集,平臺優(yōu)勢、開店選品、入駐條件盡在掌握
立即領(lǐng)取
進行中
進行中
全球平臺詳解——拉美篇
涵蓋9大熱門拉美電商平臺,成熟的市場是跨境賣家的熱門選擇!
立即領(lǐng)取
進行中
進行中
全球平臺詳解——日韓篇
涵蓋10+日韓電商平臺,入駐條件一看就懂,優(yōu)勢熱銷品應(yīng)有盡有
立即領(lǐng)取
進行中
進行中
全球平臺詳解——歐洲篇
涵蓋20+歐洲電商平臺,詳細(xì)解讀優(yōu)勢、入駐條件、熱銷品等
立即領(lǐng)取