shopify常見(jiàn)問(wèn)題和問(wèn)題解決方案介紹-ESG跨境

shopify常見(jiàn)問(wèn)題和問(wèn)題解決方案介紹

shopify新聞
shopify新聞
2022-03-28
點(diǎn)贊icon 0
查看icon 1860

如果您在使用模板編輯器時(shí)遇到了問(wèn)題,請(qǐng)查看下面是否列出了您的問(wèn)題。

問(wèn)題排查

如果您在使用模板編輯器時(shí)遇到了問(wèn)題,請(qǐng)查看下面是否列出了您的問(wèn)題。

問(wèn)題:加載頁(yè)面失敗

頁(yè)面正到不受支持的 URL

如果您的店面包含將用戶重定向到未與您的商店相連接的 URL 的代碼,請(qǐng)?jiān)谑褂媚0寰庉嬈鲿r(shí)確認(rèn)此重定向已被禁用。

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

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

由于出現(xiàn)錯(cuò)誤,頁(yè)面無(wú)法加載

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

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

  • 模板中的 Liquid 代碼無(wú)效

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

出現(xiàn) HTML 錯(cuò)誤

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

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

查找模板代碼中的問(wèn)題

  1. 點(diǎn)擊鏈接到錯(cuò)誤消息的 .liquid 分區(qū)文件。這會(huì)將您定向到編輯 HTML/CSS 頁(yè)面,并且文件將在代碼編輯器中打開(kāi)。

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

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

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

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

    • Liquid 代碼格式錯(cuò)誤

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

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

  4. 點(diǎn)擊保存。

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

其他解決方案

如果您無(wú)法按照前面的步驟解決問(wèn)題,請(qǐng)考慮以下選項(xiàng):

  • 回退到舊版模板文件

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

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

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)容僅代表作者本人觀點(diǎn),不代表ESG跨境電商觀點(diǎn)或立場(chǎng)。如有關(guān)于作品內(nèi)容、版權(quán)或其它問(wèn)題請(qǐng)于作品發(fā)表后的30日內(nèi)與ESG跨境電商聯(lián)系。

搜索 放大鏡
韓國(guó)平臺(tái)交流群
加入
韓國(guó)平臺(tái)交流群
掃碼進(jìn)群
歐洲多平臺(tái)交流群
加入
歐洲多平臺(tái)交流群
掃碼進(jìn)群
美國(guó)賣(mài)家交流群
加入
美國(guó)賣(mài)家交流群
掃碼進(jìn)群
ESG跨境專屬福利分享群
加入
ESG跨境專屬福利分享群
掃碼進(jìn)群
拉美電商交流群
加入
拉美電商交流群
掃碼進(jìn)群
亞馬遜跨境增長(zhǎng)交流群
加入
亞馬遜跨境增長(zhǎng)交流群
掃碼進(jìn)群
亞馬遜跨境增長(zhǎng)交流群
加入
亞馬遜跨境增長(zhǎng)交流群
掃碼進(jìn)群
拉美電商交流群
加入
拉美電商交流群
掃碼進(jìn)群
ESG獨(dú)家招商-PHH GROUP賣(mài)家交流群
加入
ESG獨(dú)家招商-PHH GROUP賣(mài)家交流群
掃碼進(jìn)群
《Darty知識(shí)百科》
《法國(guó)Fnac知識(shí)百科》
2025跨境電商營(yíng)銷(xiāo)日歷
《2024年全球消費(fèi)趨勢(shì)白皮書(shū)——美國(guó)篇》
《2024TikTok出海達(dá)人營(yíng)銷(xiāo)白皮書(shū)》
《Coupang自注冊(cè)指南》
《eMAG知識(shí)百科》
《TikTok官方運(yùn)營(yíng)干貨合集》
《韓國(guó)節(jié)日營(yíng)銷(xiāo)指南》
《開(kāi)店大全-全球合集》
通過(guò)ESG入駐平臺(tái),您將解鎖
綠色通道,更高的入駐成功率
專業(yè)1v1客戶經(jīng)理服務(wù)
運(yùn)營(yíng)實(shí)操指導(dǎo)
運(yùn)營(yíng)提效資源福利
平臺(tái)官方專屬優(yōu)惠

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

訂閱
聯(lián)系顧問(wèn)

平臺(tái)顧問(wèn)

平臺(tái)顧問(wèn) 平臺(tái)顧問(wèn)

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

icon icon

小程序

微信小程序

ESG跨境小程序
手機(jī)入駐更便捷

icon icon

返回頂部

【免費(fèi)領(lǐng)取】全球跨境電商運(yùn)營(yíng)干貨 關(guān)閉
進(jìn)行中
進(jìn)行中
2025跨境電商營(yíng)銷(xiāo)日歷
包括傳統(tǒng)中、外重要節(jié)日及重點(diǎn)電商營(yíng)銷(xiāo)節(jié)點(diǎn)還對(duì)營(yíng)銷(xiāo)關(guān)鍵市場(chǎng)、選品輔以說(shuō)明,讓你的365天安排的明明白白!
免費(fèi)領(lǐng)取
進(jìn)行中
進(jìn)行中
【平臺(tái)干貨】eMAG知識(shí)百科
涵蓋從開(kāi)店到大賣(mài)6個(gè)板塊:開(kāi)店、運(yùn)營(yíng)、廣告、選品、上架、物流
免費(fèi)領(lǐng)取
進(jìn)行中
進(jìn)行中
TikTok運(yùn)營(yíng)必備干貨包
包含8個(gè)TikTok最新運(yùn)營(yíng)指南(市場(chǎng)趨勢(shì)、運(yùn)營(yíng)手冊(cè)、節(jié)日攻略等),官方出品,專業(yè)全面!
免費(fèi)領(lǐng)取
進(jìn)行中
進(jìn)行中
韓國(guó)coupang平臺(tái)自注冊(cè)指南
韓國(guó)Coupang電商平臺(tái)從注冊(cè)準(zhǔn)備、提交申請(qǐng)到完成注冊(cè),開(kāi)店全流程詳細(xì)指引。
免費(fèi)領(lǐng)取
進(jìn)行中
進(jìn)行中
全球平臺(tái)詳解——全球合集
涵括全球100+個(gè)電商平臺(tái)的核心信息,包括平臺(tái)精煉簡(jiǎn)介、競(jìng)爭(zhēng)優(yōu)勢(shì)、熱銷(xiāo)品類、入駐要求以及入駐須知等關(guān)鍵內(nèi)容。
立即領(lǐng)取
進(jìn)行中
進(jìn)行中
韓國(guó)電商節(jié)日營(yíng)銷(xiāo)指南
10+韓國(guó)電商重要營(yíng)銷(xiāo)節(jié)點(diǎn)詳細(xì)解讀;2024各節(jié)日熱度選品助力引爆訂單增長(zhǎng);8大節(jié)日營(yíng)銷(xiāo)技巧輕松撬動(dòng)大促流量密碼。
免費(fèi)領(lǐng)取
進(jìn)行中
進(jìn)行中
全球平臺(tái)詳解——?dú)W洲篇
涵蓋20+歐洲電商平臺(tái),詳細(xì)解讀優(yōu)勢(shì)、入駐條件、熱銷(xiāo)品等
立即領(lǐng)取