Theme Editor Crashes When Referencing a Translation Group Instead of a Key in Schema

Hey everyone,

Today I’ve come across a minor bug causing the Theme Editor to crash.

It happens when, in a theme block or section schema, a translation group is mistakenly referenced instead of a particular translation key. For example, assume we have this translation in en.default.schema.json:

// ...
 "separator": {
        "style": {
          "solid": {
            "label": "Solid"
          }
        }
 }
// ...

If “t:separator.style.solid” is then typed anywhere in the schema (for a label, info, name, etc.), instead of the proper “t:separator.style.solid.label”, the editor just crashes the moment the block or section with that invalid key is selected.

The expected result was to see the standard error message in place of the bad translation key:

missing translation: “…” is not present in any of the [“en-US”, “en”] schema locale files

I realized what the problem was quite fast and it won’t cause me any harm, but I suspect someone may be affected by it, when instead of seeing a descriptive message, the whole editor is crashing.

Cheers!

Hey Matt - are you still seeing this bug?

Yes, I just tested this and the bug is still present. I reproduced it by cutting part of a translation key in the online theme editor using Dawn, so it doesn’t appear to be tied to my specific configuration.