Scheduling doesn't support multilingual settings

Created on 21 December 2017, over 6 years ago
Updated 12 March 2024, 4 months ago

When the scheduler fields are configured to be NOT translatable the time of (un)scheduling is synced throughout all the different translations.

It is expected that all the translations are (un)scheduled at the same time. Yet when the (un)scheduling occurs, it happens only for the first language.

Just before the first translation is saved the (un)publish field value is unset:

        // Unset unpublish_on so the node will not get rescheduled by subsequent
        // calls to $node->save(). Save the value for use when calling Rules.
        $node->unpublish_on->value = NULL;

So when these fields are not translatable it will be set to NULL for all languages, the next translation in the loop will no longer have an (un)scheduled date set.

We should first load all the translations before saving it.

πŸ› Bug report
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium mpp

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.

  • πŸ‡²πŸ‡©Moldova sc_cojocari

    Hello there.
    We have some issues with scheduler 2.0.1 and drupal 9.5.4 multi-language site.
    If we set Status field (published) to be non translatable - one for all nodes + scheduler 'publish on' field also is set for all languages + we have enabled setting "Change CT creation time to match the scheduled publish time" it will change published time just once.
    Problem is that after publish date was changed, we set it to be NULL

  • πŸ‡¬πŸ‡§United Kingdom khaled.zaidan

    I've found that there's no actual need for the conditional in the patch in #8?

    We always want to retain the publish on date for the other translations. We also need the same logic for unpublishing.

    However, we should add a check on whether the fields are translatable.

    Here's a patch that makes those changes.

Production build 0.69.0 2024