If author doesn't exist, then revision log message fails, the revision message duplicates rather than updating

Created on 7 December 2022, about 2 years ago
Updated 11 February 2024, 10 months ago

Problem/Motivation

When content is imported to a site where the 'author' (i.e. the user email) of the ported revision does not exist, then the revision is duplicated from the previous revision on the node, and the current revision message is discarded.

Steps to reproduce

  • Use two sites, but with revisions enabled.
  • In site-one, log in as a user that also exists on site-two, and create a node.
  • In site-one, export the node.
  • In site-two, import the node.
  • In site-one, add User A; in site-two, do NOT add this user.
  • In site-one, edit a piece of content while logged in as User A, leaving a unique revision message.
  • In site-one, export the edited piece of content.
  • In site-two, import the edited piece of content.
  • In site-two, confirm that revision author timestamp and message are all identical to previous revision.

Proposed resolution

Alter the code in ContentImporter->doImport() to not require that the passed in author exist on the site.

Remaining tasks

Test the provided patch and confirm that it performs as expected.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States emanaton

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