EntityUntranslatableFields constraint violation when adding new translation to entity containing a non-translatable date_recur field

Created on 17 October 2019, over 5 years ago
Updated 27 September 2024, 6 months ago

Problem/Motivation

When trying to add a new translation for an (translatable) entity that contains a non-translatable date_recur field, a EntityUntranslatableFields constraint violation occurs. This displays the message: Non-translatable fields can only be changed when updating the original language.

How to reproduce:

  • Create a translatable node type with a non-translatable date_recur field
  • Hide non-translatable fields on translation form via /admin/config/regional/content-language (Not sure if required to reproduce)
  • Add a node of the created type with:
    • a non (without rrule) repeating date
    • a infinite rrule
  • Add a translation
  • When saving the translation the following message should appear: Non-translatable fields can only be changed when updating the original language.

Proposed resolution

Always ensuring the rrule property in DateRecurItem::getValue() seems to do the trick. However I am not sure if this is the right approach.

Remaining tasks

(reviews needed, tests to be written or run, documentation to be written, etc.)

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇳🇱Netherlands casey

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.71.5 2024