Skip to content

Drupal 8: Prevents editing translations when there is a draft-in-progress in the default language

Notifications You must be signed in to change notification settings

bbenjamin/Drupal-8-Draft-Translation-Helper

Repository files navigation

Moderation + Translation Helper for Drupal 8

This was built to make life a little easier for content editors on multilingual sites with Content Moderation or Workbench Moderation enabled.

Currently, if the default language version of a node has a draft-in-progress, it's not possible to update/publish a translation of that node if there are any untranslateable fields (including files) or if the URL alias is generated by pathauto.

This works as-intended, but to a non-technical user this seems more like a bug that prevents them from publishing changes. It's also not particularly easy explaining to non-technical users how to address the issue via Drupal's UI.

This module prevents the "I can't save my changes" scenario by providing some restrictions to content editors.

If this module is installed, editors will not be able to edit a node's translation if there is a draft-in-progress of t the default language version.

If a user visits a not-default-language node on the front end, and the default language node has a draft in progress:

Local task buttons are grayed out (with css, so you can still get into the node if needed)

An alert appears stating:

There is a draft in progress for the [default language] version of this page. Editing options are disabled until the [default language] draft is published or removed. The [default language] draft-in-progress can be found [link to active draft in default language]

If a user visits a not-default-language node edit form, and the default language node has a draft in progress:

The node form is hidden from the user and replaced with same "There is a draft in progress..." notice that is quoted above.

This does limit user workflows a bit. As long as there isn't a need to work on translations while the default language version has an active draft, this module can reduce support tickets and behavior that many users would perceive as buggy.

About

Drupal 8: Prevents editing translations when there is a draft-in-progress in the default language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages