Hello everybody,

I constate a bug in continuity with the issue #2856363: Path alias changes for draft revisions immediately leak into live site when we are in multilanguage:

On a website with content moderation, workflow and at least 2 languages:

  1. Create a moderated content in language L1, save and publish.
  2. Translate the content in L2, save and publish.
  3. Create a draft of the content in L2. Change something and try to save in draft state.

You will have the message :
You can only change the URL alias for the published version of this content.

If I copy paste the path of the content in the original language, I can save in draft. So, I suppose the path of the translated version is compared with the original path of the default language. So, necessary, if path are translated too, it doesn't work.

Comments

Calystod created an issue. See original summary.

clairedesbois@gmail.com’s picture

Issue summary: View changes
clairedesbois@gmail.com’s picture

Issue summary: View changes
nicolas bouteille’s picture

Same problem here ^^

rferguson’s picture

+1 same

clairedesbois@gmail.com’s picture

Status: Active » Needs review
StatusFileSize
new1 KB

A simple patch which fix the problem

clairedesbois@gmail.com’s picture

Title: Verification path with content moderation doesn't work correctly on multilangue site » Verification path with content moderation doesn't work correctly on multilingual site
nicrodgers’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Stumbled across this issue after creating a similar issue and patch in https://www.drupal.org/project/drupal/issues/2928619

So I've marked that as a duplicate of this, and can confirm that the patch here in #6 applies correctly and fixes the problem for us.

This would probably benefit from tests, which is the reason why I'm setting it to NW.

clairedesbois@gmail.com’s picture

StatusFileSize
new9.87 KB

New patch with functional tests

clairedesbois@gmail.com’s picture

Status: Needs work » Needs review
sandyjain’s picture

I am also facing the same issue. Will this patch will be added in next 8.5 release?

pminf’s picture

Thanks Calystod, I can confirm that patch #9 solves the issue in my Drupal 8.4.1 website. But why is this issue version set to 8.5.x-dev?

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andreyjan’s picture

#9 patch creates another issue:
When you create new translation and try to save it as a draft the following exception is thrown:
The website encountered an unexpected error. Please try again later.InvalidArgumentException: Invalid translation language (de) specified. in Drupal\Core\Entity\ContentEntityBase->getTranslation() (line 866 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).

This happens because the translation doesn't exist yet.

I am attaching a new patch fixing this.

Status: Needs review » Needs work

The last submitted patch, 14: validate_path_translated_entity-2923895-14.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

nicrodgers’s picture

This was duplicated by https://www.drupal.org/node/3001124, and is now fixed in 8.6.5.