Problem/Motivation
When using the "download as unpublished" option in the Lingotek preferences, the paragraph content to also download in an unpublished state as well.
When a user publishes the parent node, the paragraph content remains in an unpublished state and doesn't appear on the page.
Steps to reproduce
Check the "download as unpublished".
Create some content with paragraphs.
Send the content for translation.
Download translation(it will be unpublished at this stage)
Publish the translated content.
The paragraph will remain unpublished.
Proposed resolution
Publish the paragraph as well when parent content is published
Remaining tasks
Apply patch
Add automated tests
User interface changes
API changes
Data model changes
Comments
Comment #2
penyaskitoComment #3
jahanzaib_at_straker commented.only-test.patch indicating failure
Comment #4
jahanzaib_at_straker commentedparagraphs will now be published.
Comment #5
penyaskitoChanging status to needs review so the testbot runs.
Comment #7
penyaskitoHurray! Well done! Tests passed and failed as expected.
Some comments though:
We only need to check for paragraph here, now that we detected the issue.
We don't need workflows nor content_moderation here, remove them from the array to speed up tests.
I'd like to have this as a test method in
\Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTestinstead of his own test class, as we have other tests extending that one for testing different translatability scenarios (e.g.\Drupal\Tests\lingotek\Functional\LingotekNodeTranslatableParagraphsTranslationTest). This way we can test if this works on those scenarios too.Comment #8
jahanzaib_at_straker commented#1 and #3 are fixed.
#2 Those are needed by other tests in
\Drupal\Tests\lingotek\Functional\LingotekNodeParagraphsTranslationTestHere are the patches(only.test and with fix).
Comment #9
jahanzaib_at_straker commentedComment #11
penyaskitoAdjusted coding standards and some assertions for consistency. This fixes the issue. Thanks!
Comment #14
penyaskitoCommitted 2b8dff9 and pushed to 4.0.x. Thanks!