Not possible to save a translation when field is not translatable and untranslatable fields are hidden

Created on 6 November 2020, almost 5 years ago
Updated 1 August 2025, 11 days ago

Problem/Motivation

The problem is that the widget causes the field values to change even when it is not visible.

The saved item has h5p_content_id = X, while the item being saved has a h5p_content key as an array.

That causes the equals() call to fail.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland berdir Switzerland

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.

  • πŸ‡ΊπŸ‡ΈUnited States illeace

    Since this issue was written, H5P has gotten better i18n support and I _think_ this no longer happens. That said, I'm not certain I understand the steps taken to generate the issue. Here's what I tried:

    • Create a content type with an H5P field that uses the H5P Editor as the form widget
    • Enable the Content Translation module
    • Add an addition language (French) in Admin > Config > Region and Language > Languages
    • On Admin > Configuration > Region and Language > Content language and translation, check the "Content" option
    • On the same page, check the content type with the H5P field
    • Check the "Hide non translatable fields..." option
    • Save my changes by clicking "Save configuration"
    • Now, edit a node of the content type for which you just added translation
    • Click the Translate tab to add (in my case) French translation
    • When this form loads, I see the H5P editor and am able to add translated values to H5P fields like Title, Heading, Alt text, etc.
    • Save the translation and everything works OK for me

    If the original issue poster is still invoved, I'd appreciate some feedback on whether this is a valid test case. If not, I suggest we close this as obsolete.

  • πŸ‡ΊπŸ‡ΈUnited States sim_1

    Thanks for looking into it, @illeace. Closing for now. @berdir - feel free to re-open if this is still an issue you are struggling with.

Production build 0.71.5 2024