Problem/Motivation

Not sure if it's related to this #2882334: Revisions are not visible for some nodes or slightly different, so opening this issue just in case as the fix here seems to be much smaller.

The issue is that we are checking whether the entity type ("node" in this case) is translatable, but we should be checking for the specific node or bundle instead.

Steps to reproduce

On an existing project (this might be important):
- Create two content types: enable translations for one and not the other.
- Create revisions in the non-translatable one and check the revisions tab, no revisions are shown.

It seems that core fixed the data inconsistency for 11.3+ in #2722307: Move translation based conditions into database query on revisions overview page, but as this module takes over the rendering of those screens, it might still need some tweaking.

Proposed resolution

Change $translatable = $entityType->isTranslatable(); to $translatable = $entity->isTranslatable(); in "src/Form/EntityRevisionOverviewForm.php".

Remaining tasks

MR

Issue fork diff-3593241

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Issue summary: View changes
Status: Active » Needs review

MR is ready.

Not sure how to go about the tests here as the situation might be hard to recreate on newer versions of Drupal, but in any case, checking that the entity is translatable seems to be the right thing to check.

fjgarlin’s picture

The tests fail showing that there are more items than expected, and I think this is the intended side effect of this change, because it wasn't showing all possible revisions.

Not sure if I should just change the number on the test to make it match. I'll wait for feedback first.