On 'Translate' tab on entity page e.g. node/% if there is no translation for the entity after changing a publishing status the tab still displays an old one status.
The bug disappears when entity have a translated version.

Moreover the module does not check that entity has no status field at all

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Title: Wrong status on Translate tab. » Wrong status on Translate tab for entities
Issue summary: View changes
FileSize
66.6 KB
andypost’s picture

Issue tags: +language-content, +D8MI
andypost’s picture

jhodgdon’s picture

We should probably postpone this until #1966436: Default *content* entity languages are not set for entities created with the API is taken care of, because I think it will prevent this problem.

andypost’s picture

I'm not sure that issues above would solve.

        $translation = $entity->translation[$langcode];
        $status = !empty($translation['status']) ? t('Published') : t('Not published');
        // @todo Add a theming function here.
        $status = '<span class="status">' . $status . '</span>' . (!empty($translation['outdated']) ? ' <span class="marker">' . t('outdated') . '</span>' : '');

Probably trouble in translation metadata, which is not updated

jhodgdon’s picture

The reason I suggested a connection is that it seems like when I've seen this issue, it goes away if the original node has the language set to a real language. Which #1966436: Default *content* entity languages are not set for entities created with the API will take care of.

andypost’s picture

Sure, but as you see the screenshot displays a taxonomy term translation that has no status but should have translation status

andypost’s picture

Checked today the term translation again and found
1) edit translation links leads to entity edit but delete leads to translation delete
2) if language added after entity saved then add translation leads to
InvalidArgumentException: Invalid translation language (uk) specified. in Drupal\Core\Entity\ContentEntityBase->addTranslation() (line 746 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).

andypost’s picture

andypost’s picture

The only thing that left here - no way to add unpublished translation

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

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

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should 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.

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

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should 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.

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

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Status: Active » Closed (cannot reproduce)
Issue tags: +Bug Smash Initiative

@vlkff, thanks for reporting this problem.

I test this on 8.8.x and was not able to reproduce the problem in the IS.

On a fresh install I added two languages and enabled content_translation. I then added an article and two translations. When unpublishing any of the translations only that translation was listed as unpublished on the content page. And deleting any of the translations did not alter the displayed published state.

And from #10

The only thing that left here - no way to add unpublished translation

I test this as well as and successfully added an unpublished translation.

Therefore, closing this a cannot reproduce.

VarunKrSingh’s picture

@quietone
This issue arise on translation page and not on content page. If you use more than two language than on translate tab the page status would be appear with wrong status.

Tested on Drupal 8.9.13

quietone’s picture

Status: Closed (cannot reproduce) » Postponed (maintainer needs more info)
FileSize
19.95 KB
25 KB

@VarunKrSingh, thank you for the clarification. When responding to an issue that is marked closed, which you think isn't fixed, change the status, in this case to 'Active', since there is no patch here. It is only by chance that I saw your reply.

I tested again, this time with standard install and Drupal 9.2.x, 8.9.x and 8.9.13. In all cases I was not able to reproduce the problem.

  • Add Italian and Spanish
  • Create a page in English
  • Translate to Italian
  • Check translate tab and Content page, status is correct
  • Unpublish one of the pages
  • Check translate tab and Content page, status is correct
  • Add a Spanish Translation
  • Check translate tab and Content page, status is correct
  • Unpublish all but the Spanish translation
  • Check translate tab and Content page, status is correct

I tried to make it break, changing the status on either translation a couple of times. But always the status was correct on both the translate tab and the content page.

@VarunKrSingh, Can you provide complete steps to reproduce the issue (starting from "Install Drupal core").

quietone’s picture

VarunKrSingh’s picture

@quietone, Thank you for looking into it. Apologies for not providing full information. The translate page showing correct page status when used individually but having the reported glitch when used with content moderation and workflow module.

The steps i followed as

1. Install Drupal via composer.
2. Enable Multilanguage for French and Spanish.
3. Create user group content author and content approver.
4. Enable Content moderation and workflow module with intermediate page status(draft, review,archive).
5. While creating node first time with draft status, it show status unpublished which is correct.
6. when i make status change draft to review, it show status unpublished which is correct.
7. when i make status change review to publish, it show status published which is correct.
8. when i make translation of node in french and spanish with published, it show status published of all which is correct.

all the above status are need to notice on translate page of a particular node. now we need to change the status of all translations and need to check status.

9. If i make parent node draft, french translation review and spanish translation published it shows published to all which is wrong.
10. If i make parent node publish, french translation draft and spanish translation archive it shows unpublished to all which is wrong.

thank you.

VarunKrSingh’s picture

Status: Postponed (maintainer needs more info) » Active

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.