Reset Translation for Blocks field

Hi!

I have a multi language page setup. Using the panel I edit a page with a field of type Blocks:

  1. In the default language I write some content, in the secondary language I leave this field empty
    1. In the frontend with the default language selected I see this content
    2. In the frontend with the secondary language selected I also see this content
  2. In the panel I select the secondary language and replace the content with a translation
    1. In the frontend with the default language selected I see the original content
    2. In the frontend with the secondary language selected I now see the translation
  3. For some reason I want to get rid of the translation. In the panel I select the secondary language and remove all blocks from the translation, leaving the empty Blocks editor, same as in step 1.
    1. In the frontend with the default language selected I see the original content
    2. In the frontend with the secondary language selected I now an empty section

How do I get back to the original content being shown as a fallback, instead of an empty section without going into the file system and deleting the empty key from the translated content txt?

Thanks,
Christoph

1 Like

The only way to do that would be through coding this fallback in your templates, I’m afraid. The same would also happen if you save an empty translation in the first place. But let me do a quick test if the behavior is different for other field types.

Edit: The behavior of the blocks field is in line with the behavior of other fields. As soon as you save, the keys are saved as well, no matter if they contain content or not. After all, not filling in any content could be intentional.

I see, thanks so much for the fast reply! I get why that makes sense in most cases.

However I do find myself wanting to reset translated fields in the panel quite often. A “Reset Field” action would be pretty helpful in these cases. I created a feature request on your board for this: "Reset Translated Field" in Panel · Kirby Feedback

Again, thanks for looking into this so quickly.