Daandelange / kirby3-TranslatedLayout

A layout field with embedded translation logic.
MIT License
17 stars 1 forks source link

Error "The parsed string data looks wrong" #5

Closed Small-Systems closed 1 year ago

Small-Systems commented 1 year ago

Hey,

There is an error with the latest version of the plugin when the translated field is empty. If I create a page in the default language, then edit the translated version, the translated version will have an empty field, in my case Layout:

This causes an error to be thrown:

The parsed string data looks wrong. Aborting. in file: /site/plugins/translatedlayout/src/classes/TranslatedLayoutField.php line: 213

If I manually edit the translated content file to remove the Layout: field altogether then the error disappears and I see the default language layouts.

Daandelange commented 1 year ago

Hey, thanks for the report, I'll have a look.

Daandelange commented 1 year ago

If the default language is empty, it's normal that the translation remains empty too : both are synchronised based on the structure of the default language.

However, it's now normal that the error throws. 2d19a88e77 should fix the error message you had.