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

[MediaBundle] Fix for deleting media #3043

Open
wants to merge 4 commits into
base: 5.6
Choose a base branch
from

Conversation

Minhan12
Copy link

@Minhan12 Minhan12 commented Jan 5, 2022

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets

This pull request will fix 2 bugs in the MediaBundle.

  1. When using the command php bin/console kuma:media:clean-deleted-media --force to delete the files by the original filename, it will skip the files from the filesystem that have been renamed due to strange characters in the filename. Using the command php bin/console kuma:media:rename-soft-deleted -o will update the filename back to the original filename. However, it doesn't use the same method as when an user uploads a file so this command will not update the filename correctly.
    This fix will add the slugifier to the command so it will pass the same method when renaming the filename.

  2. The command also expects the directory to be deleted. however, it uses a directory name to check if a file exists, so it fail on the check so it doesn't delete the directory.

@Minhan12 Minhan12 changed the title Fix/delete media [MediaBundle] Fix for deleting media Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant