Shopify themes, liquid, logos, and UX
This is a machine translation.
There may be strange expressions, but I hope you can understand.
I have added a section template with the ability to select a blog post and display it in the store. However, when I selected a blog post with Japanese handles in Theme editor, an error message was displayed and I could not display the selected post in the store.
When I tried it on a section that had a field for selecting product or page, I didn't get an error even with Japanese handles.
Here are the steps to reproduce the error.
I would appreciate any advice.
[1] Create a section to select articles.
Sections/news.liquid
<ul> {% for block in section.blocks %} {% assign article = articles[block.settings.news] %} <li>{{ article.title }}</li> {% endfor %} </ul> {% schema %} { "name": "news", "blocks": [ { "type": "article", "name": "news", "settings": [ { "id": "news", "type": "article", "label": "article" } ] } ] } {% endschema %}
[2] Add the section created in [1] to one of the templates (eg "page.liquid").
{% section 'news' %}
[3] In Theme editor, go to the page that uses the template edited in [2].
[4] A field for selecting articles will be added, so select an article that has Japanese handles.
[5] Then you will get the following error message.
Setting 'news' must be a valid article handle.
I am having same exact error, did you found possible fix for it?
I faced the same problem.
Checking the name of the article solved it for me.
As a handle I use to have a heart emoji
i-HEART-EMOJI️-ink-2nd-anniversary-live-replay
So i changed the emoji to letters, like this:
i-love-ink-2nd-anniversary-live-replay
Basically, if you have characters that shopify doesnt like, it'll throw an error.
So you need to edit that handle by going to the post that's giving you problems and edit the "Search engine listing preview" section. Click on "Edit website SEO" link
User | RANK |
---|---|
180 | |
157 | |
76 | |
36 | |
33 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023