Quick Edit revision references wrong author

Created on 20 April 2022, over 2 years ago
Updated 4 May 2023, over 1 year ago

Problem/Motivation

When using quick edit to make changes on a revisionable node, the author of the quick edit revision is wrong.

Steps to reproduce

  • Create a node with user 1.
  • Logout of the site and login with user 2.
  • Use quick edit to change something on the node created by user 1, e.g the body field
  • Go the revisions tab of the node and check the author of the revision. It will be user 1 instead of user 2.

Proposed resolution

In QuickEditFieldForm.php in the init function where the entity is prepared with $entity->setNewRevision($node_type->shouldCreateNewRevision()); another call is needed after to set the revision's user id $entity->setRevisionUserId($this->currentUser->id());.

Remaining tasks

  • Write test that proves the issue.
  • Provide patch that fixes the issue.
🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇨🇦Canada pavlosdan

Live updates comments and jobs are added and updated live.
  • 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

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