getCandidatesRevisionsByNids() returns more results as getCandidatesRevisions()

Created on 11 February 2021, over 3 years ago
Updated 7 March 2024, 7 months ago

Problem/Motivation

The methods in the node_revision_delete returns different number of revision candidates.
More specific:
getCandidatesRevisionsByNids() returns more revision candidates as getCandidatesRevisions().

I used the same nids which getCandidatesRevisions() resolves $candidate_nodes = $this->getCandidatesNodes($content_type); on line 327.

Steps to reproduce

- Call getCandidatesRevisions()
-- returns 10 results
- Call getCandidatesRevisionsByNids() with the same nids
-- returns 15 results

I tried with different bundles (node) and it's overall the same behavior.
The plain sql query executed directly in the DB from getCandidatesRevisionsByNids() returning the same number as the method.
FYI: The two queries differ only in the where condition where the nid are/is filtered.

It's maybe a general query problem with the query

Remaining tasks

- Check if it's a general problem or only my DB which is not consistent.
- Which method should be used to delete revisions safely?

🐛 Bug report
Status

Closed: outdated

Component

Code

Created by

🇨🇭Switzerland DanieleN

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