Node revision UI will sometimes show no revisions on a page

Created on 13 October 2017, about 7 years ago
Updated 29 August 2024, 3 months ago

Under the current node revisions overview logic, it is possible for a page of the revisions listing to show no revisions. This is confusing.

The NodeController->revisionsOverview() method reads in all revisions of the current node, and then filters them down according to whether the revision in question has a translation for the currently active language, and whether that revision translation is 'affected'. This was done in #2465907: Node revision UI reverts multiple languages when only one language should be reverted โ†’ to address the issue of the revision UI reverting multiple translations when it shouldn't be.

Because the paging of the revisions query doesn't account for language and 'affected' state, it is possible for the revisions query to return a set of revisions for a node of which none of the revisions belong to the language being tested, nor are any of them marked as 'affected'. This filters the list down to zero, which results in an empty table of revisions for that page, which is confusing.

It's possible for this situation to arise on a site with many active languages. Given a site with 55 languages, if a node goes through translation, and there is a new revision for each language that is translated, it would be very possible for a given page of revisions to contain no revisions eligible for display.

The logic which filters down the returned page of revisions to the current language and 'affected' should be able to be pushed into the revision query itself (NodeController->getRevisionIds()). Since this is a protected method not called anywhere else, it should be safe to add these conditions to the query, to allow the pager to function properly.

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Node systemย  โ†’

Last updated about 15 hours ago

No maintainer
Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States timcosgrove

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024