Non-translatable field error

Created on 17 February 2022, over 2 years ago
Updated 10 July 2023, 12 months ago

Problem/Motivation

When the content entity has enabled translations, rabbit hole fields return error. The error appears in the case when the field is checked as translated and non-translatable in the content translation settings.

Steps to reproduce

Make content type (in my case it was media type) translatable and enable/disable translation for rabbit hole field.
Try to add a new entity and then add a translation for an entity.

Proposed resolution

As I know, other field's visibility on translation form is controlled by widgets. I've checked the rabbit_hole module and found that fields are controlled in hook_form_alter and with service rabbit_hole.form_mangler. Since translation functionality is not included in the module there is a need to hide this field for translations in form alter (check if the current entity is default translation). Then to make it work on translations, need to synchronize rabbit_hole settings from the main translation to other translations. Then rabbit_hole behavior on translations will be the same as on the original language. It will remain the same even when the original translation was updated.

πŸ› Bug report
Status

Closed: duplicate

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine s.kulyk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024