The Needs Review Queue Bot โ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.
- Status changed to Needs review
4 months ago 11:27pm 27 August 2024 - ๐ณ๐ฑNetherlands seanB Netherlands
I just ran into the same issue working with translations and content moderation. Specifically when:
- The user adds a translation (from EN to NL for example).
- The user publishes both EN and NL.
- The user then removes the NL translation.
- More revisions are made for EN (these revisions no longer have a copy of the NL translation since it has been removed).
- The the user visits the translation overview, somehow it seems the NL translation still exists, so the user can't create a new translation, and is also not able to delete the NL translation.
When I tried the latest patch I still found two issues:
- The translation overview uses the latest translation affected revision. Which made it seem like the NL translation could not be removed (since the NL langcode had an older translation affected revision). We should probably also check here if the latest translation affected revision is newer than the default.
- The entity repository
EntityRepository::getActive()
also loads the latest translation affected revision. This prevented creating a new translation from the default revision.
An updated patch is attached.
- ๐ณ๐ฑNetherlands seanB Netherlands
If the default revision still contains the translation, we can still allow older revisions to be loaded.
- Status changed to Needs work
4 months ago 12:51am 4 September 2024 - ๐ฎ๐ณIndia Sahana _N
sahana _n โ made their first commit to this issueโs fork.
- Status changed to Needs review
3 months ago 2:13pm 18 September 2024 - ๐ฎ๐ณIndia Sahana _N
Hi
I tried to fix the text cases ContentTranslationAddTranslationTest is working fine now.
On the Run of the test case, I got an Error
sahana.n@drupal-11-web:/var/www/html$ vendor/bin/phpunit --configuration phpunit.xml core/modules/content_translation/tests/src/Functional/ContentTranslationAddTranslationTest.php PHPUnit 10.5.20 by Sebastian Bergmann and contributors. Runtime: PHP 8.3.8 Configuration: /var/www/html/phpunit.xml F 1 / 1 (100%) Time: 00:01.862, Memory: 4.00 MB There was 1 failure: 1) Drupal\Tests\content_translation\Functional\ContentTranslationAddTranslationTest::testWithOlderSourceTranslation Behat\Mink\Exception\ElementNotFoundException: Button with id|name|label|value "Save" not found. /var/www/html/core/tests/Drupal/Tests/WebAssert.php:158 /var/www/html/core/tests/Drupal/Tests/UiHelperTrait.php:78 /var/www/html/core/modules/content_translation/tests/src/Functional/ContentTranslationAddTranslationTest.php:93 FAILURES! Tests: 1, Assertions: 2, Failures: 1.
ContentTranslationAddTranslationTest Extends the ContentTranslationPendingRevisionTestBase
And here node save was not happening.
I referred to other test cases of how node save happens and fixed it with the submit form.Now ContentTranslationAddTranslationTest is executing properly.
I am happy to take suggestions if the fix is not appropriate. Please let me know.
Thank you !!
- Status changed to Needs work
3 months ago 1:49pm 19 September 2024