Consider showing all revisions on the revision overview

Created on 10 May 2016, about 9 years ago
Updated 15 May 2024, about 1 year ago

Problem/Motivation

#2713587: NodeController::revisionOverview() shows no revisions if node has no translation for current language β†’ brought up again that we have a conflict between trying to show only translation-relevant content in places like admin listings, vs. showing people the full history of nodes. This is also a conflict between trying to maintain the original UX of translation sets from 6/7 vs. the field translation approach.

Overall I think the revision tab should show all edits to a node regardless of affected language. For example how else would you undo adding a translation except reverting to the revision just before? We could then have a per-language filter on the page to show only affected languages. Or two tab

Proposed resolution

1. Status quo
2. Show all revisions
3. Have an 'all revisions' tab
4. Show all revisions but have the option to filter by language

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
Node systemΒ  β†’

Last updated about 1 hour ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs screenshots

    The change alters the user interface, so before and after screenshots should be added to document the UI change. Make sure to capture the relevant region only. Use a tool such as Aviary on Windows or Skitch on Mac OS X.

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.

  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    Another related problem at would be solved by this: The paging is done in NodeController::getRevisionIds(); that returns 50 revisions at a time. Then in ::revisionOverview(), some of the revisions may be skipped. This can result in an empty results page. I've seen a pager with several pages, but only two revisions that actually appear anywhere.

  • Status changed to Postponed: needs info 2 months ago
  • πŸ‡¦πŸ‡ΊAustralia acbramley

    Is this something we still can/want to/should consider?

  • πŸ‡¬πŸ‡§United Kingdom catch

    I think we should do this.

    A language selector would allow for a closer equivalent to the current behaviour for people that need it, but the page just does not properly work as it currently is, so I think we could open a separate issue to add that, and keep things simple here.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    Added related/dupe issues for core and Diff. I think the main issue here is the isRevisionTranslationAffected check.

    The generic revision UI also has this same check in VersionHistoryController::loadRevisions. Whatever fix we do for Node should apply there too.

    Agreed that we should keep this one simple and potentially add a language filter in another issue if needed.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    After debugging this more it's clear that the current code is definitely masking some pretty weird issues.

    E.g set up the following:
    1. Install standard
    2. Install content_translation module
    3. Add another language (e.g Dutch)
    4. Edit Basic page content type and mark it translatable
    5. Create a node, then translate it to the new language, adding a revision log of "create LANGUAGE revision".

    At this point this will create 2 new revisions - one for English and one for Dutch. The English one will be marked with revision_translation_affected = NULL
    The node_revision table will have 2 records, but node_field_revision will have 3. 2 of those will be for vid 2, one for each language. Vid 2 for english will have values copied from vid 1 (i.e created/changed dates).
    Since the revision_log field is not translateable, the node_revision table will have "create LANGUAGE revision" for vid 2, which is the default revision for english.

    6. Go to node/1/revisions (i.e the English revisions page). You'll see 1 revision marked as current, but this is actually revision 1. You won't see a revision log message, which IMO is incorrect. The reason this is incorrectly shown as the current revision is because of this code:

            // We treat also the latest translation-affecting revision as current
            // revision, if it was the default revision, as its values for the
            // current language will be the same of the current default revision in
            // this case.
            $is_current_revision = $revision->isDefaultRevision() || (!$current_revision_displayed && $revision->wasDefaultRevision());
    
  • Pipeline finished with Failed
    2 days ago
    Total: 723s
    #509843
  • Pipeline finished with Failed
    2 days ago
    Total: 737s
    #509863
  • Pipeline finished with Success
    2 days ago
    Total: 1256s
    #509905
  • Status changed to Needs review 2 days ago
  • πŸ‡¦πŸ‡ΊAustralia acbramley

    This is green now.

    Want to get a review on the code changes before going ahead with a full IS update + CR.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Can the summary be updated with what’s being proposed? Do we want a page with all revisions loaded? What if it’s 1000s of revisions

Production build 0.71.5 2024