Add tests for reverting revisions where revision_uid and uid differ

Created on 11 April 2012, over 12 years ago
Updated 25 January 2023, almost 2 years ago

Problem/Motivation

Prior to #2057401: Make the node entity database schema sensible β†’ and the implementation of fully revisioned node fields, data loss was possible when reverting between revisions with different node authors. This has been a long-standing source of confusion and bugs through multiple versions of Drupal core. Notwithstanding that this should now be "fixed", tests should be implemented to ensure that node and revision author information is in fact preserved across revisions and reverts.

Per comment #8 by catch β†’ below, the typical problem scenario arises when changing author information across revisions and then reverting:

Steps to reproduce, logged in as user 1 works fine for this.

  1. Create a node with user A (current user is fine)
  2. Edit the node, change authoring information to user B, check the 'new revision' checkbox.
  3. Revert to the revision created with #1.
  4. Revert to the revision created with #2.

Now there's two issues:

  1. User A is still listed as the author of the node, but it should be user B.
  2. There is no trace of user B ever being the author of the node in the node_revisions table or anywhere else.

Proposed resolution

The underlying need for revisioning author information has been addressed in core, but we should add tests to ensure there is no future regression.

Remaining tasks

The test proposed needs to be reviewed.

User interface changes

None -- this affects automated testing only.

API changes

None -- this affects automated testing only.

<!-- Delete or add "Novice" from the Novice? column in the table below as appropriate. Uncomment tasks as the issue advances. Update the Complete? column to indicate when they are done, and maybe reference the comment number where they were done. -->

Contributor tasks needed

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->
πŸ“Œ Task
Status

Postponed: needs info

Version

9.5

Component
Node systemΒ  β†’

Last updated 4 days ago

No maintainer
Created by

πŸ‡³πŸ‡±Netherlands yoroy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

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