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:
- Create a moderated content in language L1, save and publish.
- Translate the content in L2, save and publish.
- 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.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | interdiff_2923895-9-14.txt | 1.52 KB | andreyjan |
| #14 | validate_path_translated_entity-2923895-14.patch | 10.33 KB | andreyjan |
| #9 | validate_path_translated_entity-2923895-9.patch | 9.87 KB | clairedesbois@gmail.com |
Comments
Comment #2
clairedesbois@gmail.comComment #3
clairedesbois@gmail.comComment #4
nicolas bouteille commentedSame problem here ^^
Comment #5
rferguson commented+1 same
Comment #6
clairedesbois@gmail.comA simple patch which fix the problem
Comment #7
clairedesbois@gmail.comComment #8
nicrodgersStumbled 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.
Comment #9
clairedesbois@gmail.comNew patch with functional tests
Comment #10
clairedesbois@gmail.comComment #11
sandyjain commentedI am also facing the same issue. Will this patch will be added in next 8.5 release?
Comment #12
pminfThanks 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?
Comment #14
andreyjan commented#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.
Comment #17
nicrodgersThis was duplicated by https://www.drupal.org/node/3001124, and is now fixed in 8.6.5.