Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x]: index-assets/one with specific folder and --delete-missing-assets=1 is very dangerous combination #14087

Closed
timbertens opened this issue Dec 30, 2023 · 2 comments
Assignees

Comments

@timbertens
Copy link

What happened?

Description

This combination just lost a large chunk of the asset index entries on a large number of sites

Steps to reproduce

  1. Have a S3 volume 'shared' somewhere with different subfolder1, subfolder2, subfolder3, etc
  2. Run 'php craft index-assets/one shared/subfolder2 --delete-missing-assets=1

Expected behavior

The subfolder2 gets indexed and if there are missing assets in subfolder2 then they are removed from the index

Actual behavior

The subfolder2 gets indexed, all files that are not re-indexed (so those from subfolder1, subfolder2 and subfolder3) are removed from the index

Is an issue in 3.x for sure, might also be in future versions ...

Craft CMS version

3.9.6

PHP version

7.4.30

Operating system and version

not relevant

Database type and version

not relevant

Image driver and version

not relevant

Installed plugins and versions

not relevant

@i-just
Copy link
Contributor

i-just commented Jan 2, 2024

Hi, thanks for reporting! I raised PRs to adjust this.

@brandonkelly
Copy link
Member

Craft 3.9.10, 4.5.14, and 5.0.0-alpha.4 are out with a fix for this. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants