When bulk saving nodes also the old revisions are reindexed

Created on 30 May 2023, over 1 year ago
Updated 25 September 2023, about 1 year ago

Problem/Motivation

The issue emerged when we had a situation where a blocked user was removed and we chose “Delete the account and make its content belong to the Anonymous user”. This means that each of the content is revisited to change the owner. Unexpectedly, the Elasticsearch Helper re-indexed not the newest revisions of the nodes but older ones too. This caused old information to be shown in the site.

Steps to reproduce

Remove a user with a lots of content and choose “Delete the account and make its content belong to the Anonymous user”.
Follow the logs to see what content is revisited.
Check if any of the re-saved content (now owned by the Anonymous) is something else than the newest revision.

Proposed resolution

Ensure that only newest (published) node revision is handled.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: works as designed

Version

7.0

Component

Code

Created by

🇫🇮Finland mlahde

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

Comments & Activities

  • Issue created by @mlahde
  • Status changed to Closed: works as designed about 1 year ago
  • 🇱🇻Latvia maijs

    I believe the old revisions are being re-indexed because Drupal changes the author for every revision to strip any reference to the user being removed. It's a side effect of Drupal/ESH cohesion.

    It really comes down to Elasticsearch index plugins that do the actual indexing. Ideally, it should only index entities that are published. In that case no revision without a published state would be indexed.

    Given the that fact that Elasticsearch Helper doesn't provide any index plugins on its own, I'm marking this as works as designed.

Production build 0.71.5 2024