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

Media file not deleted after status change #6573

Open
medienbaecker opened this issue Jul 25, 2024 · 1 comment
Open

Media file not deleted after status change #6573

medienbaecker opened this issue Jul 25, 2024 · 1 comment

Comments

@medienbaecker
Copy link
Contributor

medienbaecker commented Jul 25, 2024

Description

Normally, when deleting files, their media file gets deleted in the process. Changing the status of the parent page before deleting the file will however not delete the file.

Expected behavior
The media file should be deleted with the file.

To reproduce

  1. Upload a file to any page
  2. Change the page's status to draft
  3. Delete the file
  4. The media file is still available (and will forever be)
CleanShot.2024-07-25.at.13.57.56.mp4

Your setup

Kirby Version
4.3.0

@bastianallgeier
Copy link
Member

We need to remove the old media folder in the Page::unpublish method as it seems.

public function unpublish(): static

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

No branches or pull requests

2 participants