Skip to content

[5.x]: utils/prune-orphaned-entries deletes all entries in some sections #15458

@MoritzLost

Description

@MoritzLost

What happened?

Description

In trying to debug an issue, I ran utils/prune-orphaned-entries in a local development environment with a copy of the production database. To my surprise, it deleted all entries in some sections. Only sections where the propagation is set to the Save entries to all sites enabled for this section were left untouched. All sections that were set to manual propagation (Let each entry choose…) or no propagation had all entries in all sites deleted.

Not sure how to reproduce this or if it's an issue with my database, but this should never happen.

The issue I'm trying to debug is related to #14348 and #14347. We're still seeing remnants of previous relations sticking around, querying for relations returns elements that were previously related, but were removed from the field. I can't reproduce this fully yet, but something is still not right there. Not sure if it's a database issue that might also cause this problem.

Craft CMS version

5.2.8

PHP version

8.3

Operating system and version

No response

Database type and version

MySQL 8

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions