- Issue created by @gugalamaciek
- 🇵🇱Poland gugalamaciek
Proposed patch makes sure, that:
$entity->setRevisionTranslationAffected(TRUE);
is set before save operation.
There are revisions where the “revision_translation_affected” flag is not set for any translation within a given revision. This seems incorrect, as at least one translation should always be marked as affected.
Create content moderations setup where you have 3 states: archived (status = 0
), draft (status = 0
) and published (status = 1
).
Enable content moderation using these 3 statuses.
Create entity with content moderation equals to draft.
Use views_bulk_edit and archive the entity.
Flag "revision_translation_affected" is not set, while this change is related to given revision.
It's because content moderation are separate entities and as we change from draft to archived, there is no change in fields on entity itself. But this change is related to this revision.
As result, e.g. this revision is not visible on Revisions tab.
The simplest way is set "revision_translation_affected" manually. It might be, that better improvement could be to use approach like on ScheduledTransitions module: https://git.drupalcode.org/project/scheduled_transitions/-/blob/2.8.x/sr... In short:
// Creating revisions via createRevision to invoke
// setRevisionTranslationAffected and whatever other logic doesn't happen
// automatically by simply setting setNewRevision on its own.
// 'default' param: will be changed by content moderation anyway, and
// ->setNewRevision() is called.
Active
2.0
Code
Proposed patch makes sure, that:
$entity->setRevisionTranslationAffected(TRUE);
is set before save operation.