Media entity translations do not adhere to status (published/unpublished)

Created on 4 July 2023, 11 months ago
Updated 23 January 2024, 4 months ago

Problem/Motivation

When you have a translated Media entity, for example file and when you change status of a translated media entity the status does not change.

Update:
It works via the "content_translation" status checkbox (location in it's own section in html) but I do find this quite odd. Node and taxonomy and other don't work like that. So for UX I would definitely streamline this.

Question remains, because the tests that fail look for this content_translation_status field, if this is indeed okay?!

Steps to reproduce

  1. For a media entity type set translated to true
  2. Translate a media entity so you have 2 languages for an entity
  3. Change Status on one entity and see that it does not reflect your changes (it does work with VBO though)

Proposed resolution

Add a translation handler to Media like on Node, Taxonomy, ....

Remaining tasks

Review patch where I've added the translation handler.

Release notes snippet

Media entity translations adhere to status

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated 1 day ago

Created by

πŸ‡§πŸ‡ͺBelgium Mschudders

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

Merge Requests

Comments & Activities

  • Issue created by @Mschudders
  • πŸ‡§πŸ‡ͺBelgium Mschudders

    code mostly taken from the TaxonomyTranslationHandler.php

  • last update 11 months ago
    30,339 pass, 3 fail
  • @mschudders opened merge request.
  • πŸ‡§πŸ‡ͺBelgium kriboogh

    Tested on D9 and D10 works.

  • Status changed to Needs work 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    MR should be updated for 11.x as it will have to land there first to be backported.

    But change seemed to cause some test failures so the fix may need to be tweaked.

    Also will need it's own test coverage.

  • First commit to issue fork.
  • Pipeline finished with Failed
    7 months ago
    #46883
  • πŸ‡ΉπŸ‡·Turkey makbay

    This is a major one. I have updated the MR for 11.x.

  • πŸ‡ͺπŸ‡ΈSpain julio.raimondi Barcelona, Spain

    We have a requirement to have unpublished media in all active languages, ready to be published eventually, but the current functionality requires to have at least one media translation published as it is stated in the "This translation is published" checkbox: "You must publish at least one more translation to unpublish this one. "

    We created a patch (3372217-11-media-entity-translations-status-published-unpublished.patch) that has been tested in Drupal 10.2.2, PHP 8.1.26 and Mysql 5.7.42 successfully.

    Thanks for this solution that has allowed us to solve our issues, it was causing struggle and confusion among our content managers. We are glad this is being worked on, and without a doubt we consider it convenient for future releases.

  • πŸ‡ͺπŸ‡ΈSpain julio.raimondi Barcelona, Spain

    I Sorry, i made a mistake on the patch i uploaded on comment #11, i am uploading the right patch (3372217-12-media-entity-translations-status-published-unpublished.patch

  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    #81167
Production build 0.69.0 2024