Problems with Japanese handle in Theme editor

sasaki
New Member
3 0 1

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.
Replies 2 (2)
dipeshbeckham
Shopify Partner
2 0 0

I am having same exact error,  did you found possible fix for it?

gabocles
Shopify Partner
5 0 1

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

 

gabocles_0-1628173833973.png