- π·π΄Romania amateescu
Here's the fix for this. Marking as NW because it needs test coverage.
- πΊπΈUnited States Tim Bozeman
Thanks for getting that going Andrei! How does this tweak look?
I noticed that if I create a translation > delete it > recreate it, I get an invalid translation error cause it already exists.
- πΊπΈUnited States Tim Bozeman
@amateescu Do we need that
$default_revision->setUnpublished();
part? It doesn't seem like it, but I'm not quite sure. π€We just noticed that when we add a translation the Live version is disappearing. π
- Status changed to Needs review
8 months ago 7:55pm 18 March 2024 - π·π΄Romania amateescu
Do we need that
$default_revision->setUnpublished();
part?Yep, we do, but we need to set on the proper object, which is the translation we just created :)
While writing test coverage for this bug, I found that
hook_entity_translation_insert()
is a better choice for handling this situation. - Merge request !7085Add a translation for the default revision when creating a new translation in a workspace. β (Open) created by amateescu
- Status changed to Needs work
8 months ago 8:04pm 18 March 2024 The Needs Review Queue Bot β tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request β . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- Status changed to Needs review
8 months ago 8:09pm 18 March 2024 - Status changed to Needs work
8 months ago 2:22pm 19 March 2024 - πΊπΈUnited States smustgrave
Small nitpicky
But 1 question about the return of hook_entity_translation_insert
- Status changed to Needs review
8 months ago 5:44pm 19 March 2024 - Status changed to RTBC
8 months ago 6:04pm 19 March 2024 - Status changed to Needs work
8 months ago 9:28am 20 March 2024 - Status changed to RTBC
8 months ago 10:25am 20 March 2024 - Status changed to Fixed
8 months ago 10:44am 20 March 2024 - π¬π§United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.