Support entity translations

Created on 30 June 2021, over 3 years ago
Updated 31 August 2024, 4 months ago

Problem/Motivation

The module currently does not work correctly with translations of e.g. nodes. This is a key feature which is needed for a lot of people looking for a suiting module to schedule their transitions easily on the node form.

Steps to reproduce

  • Create a Node in a language (e.g. english) as draft
  • Create a translation (e.g. german) as draft
  • Schedule publication of german translation
  • Run Cronjob
  • => the publication is not performed, because the query only looks for original language entities that require action.

Proposed resolution

Add some language related checks to the ScheduledPublishCron Service so also language versions are checked individually.

Remaining tasks

Check provided patch and provide feedback :)

User interface changes

None.

API changes

None.

Data model changes

None.

Feature request
Status

Needs work

Version

3.9

Component

Code

Created by

🇨🇭Switzerland florianmuellerch Aarau, 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.

  • 🇫🇮Finland tvalimaa

    Patch is working but there is still some case where is not working.

    Like I have 2 translations on node x:
    - Finnish translation is unpublished and I change that for published (original content)
    - English translation is published and I change that for unpublished (translation)

    So if I change both node statuses on same cron run then both statuses aren't changing so they are same status before cron run.
    - Finnish was unpublished and is still unpublished even I wanted that published
    - English was published and is still published even I wanted that change to unpublished

  • 🇮🇪Ireland lostcarpark

    Thanks for your work on this. Sounds like there is a little more work needed to complete.

    I think it would be worthwhile designing some automated tests to demonstrate the issue in the current release, and verify the fix works in the cases above.

  • Status changed to Needs work 4 months ago
  • 🇮🇪Ireland lostcarpark

    I would love to have support for translations, so would be keen to get this included in a release soon.

    However, I feel there is some work needed to complete this.

    1. Move from a patch to a merge request
    2. Make sure it doesn't need updating to reflect changes to the module
    3. Cover off the exceptions described above
    4. Add test cases to verify the basic functionality for translations. I feel this is important, as not everyone uses this feature, and we need to cover against future developers accidentally breaking the functionality

    For the last, I'd be happy to work on some test cases, but I haven't written multilingual tests before, so it would really help if someone could outline the steps to test the functionality from a fresh Drupal install.

    I'm setting back to needs work, as it needs some work before it would be ready to merge into the module.

Production build 0.71.5 2024