Cannot save "Make template part" when the template part name is in multibyte language #38160
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
In the new (theme) editor, one can save block(s) as template parts, accessed via the "three-dots" menu. It seems you cannot save it if multibyte language is used as template part name.
Looking at the console error, there seem to be something with creating slug from the input text? and JS has stopped there, resulting in "saving" to not finish.
I tried same thing with English template name, and it worked.
Note: I have not tested in other multibyte language such as CK, but looking at the nature of the issue, I am suspecting it is multi-byte related.
Step-by-step reproduction instructions
私のテンプレートパーツのテスト
You should see that Create button do the animation to save, but never seem to end. If you keep open the dev tool console tab, you should be able to see `Cannot read properties of undefined (reading 'slug) error.
(here you seeing the error three times, because I attempted three times)
Repeat above with non-multibyte language and you won't encounter the error.
Screenshots, screen recording, code snippet
No response
Environment info
Gutenberg is deactivated.
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: