Problem/Motivation
Original motivation:
While migrating a large (active) site with important revision history from D7 to D9, the revision IDs would be out of order as they came in, leading to a broken interface from a user perspective. Considering that the revision ID isn't really the important part from an admin user perspective (and isn't displayed in the admin interface anywhere), changing the sort to timestamp (which is the text to the revision link already) seems reasonable.
The parent issue resolves the patch and fixes tests moving forward for 8.x-1.x, but as tests change from the release to the dev branch, we need to port the changes and make sure tests are passing for the current release.
Steps to reproduce
(Simplest)
1. View a node with multiple revisions.
2. Change one of the revisions in the `node_revision` table - either swap the IDs or swap the timestamps. (Also easier to see the difference if the timestamps are >1 minute apart).
3. Note that the ordering on the `Revisions` (version-history) tab of the node is out-of-order by date.
Proposed resolution
- Fix tests on 8.x-1.0 branch with the relevant changes from https://www.drupal.org/files/issues/2022-05-04/sort_by_revision_timestam...
Remaining tasks
- Fix tests
User interface changes
Revisions will be ordered by timestamp.
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | name_revert_label_by_timestamp-v2.patch | 961 bytes | gdeguzman |
| #3 | revision_sort_by_timestamp-8.x-1.0.patch | 1.28 KB | gdeguzman |
Comments
Comment #2
gdeguzman commentedComment #3
gdeguzman commentedComment #4
gdeguzman commentedA patch that changes the labels of the `Revert` / `Set as Current Revision` to work according to timestamp.
Comment #5
gdeguzman commentedFix the boolean check to correctly check the revision timestamp.
Comment #6
gdeguzman commentedComment #7
gdeguzman commentedEssentially the same as the parent ticket. #3276716