Bug: All Photo's being deleted when using rotate button
-
Issue
When using the rotate function inside Lychee inside an album, the pics inside the album seems to be getting wiped and leaves you with one picture in the album.
Steps to reproduce:
- Open Lychee
- Some album
- Open picture
- Use rotate functions (right)
- Error message: Error - could not delete files
- Go back to the album
- Hit refresh
Excepected result:
Rotating picture to the desired position
Actual result:
Only 1 picture is visible and the rest is deleted? Or just not visible anymore.
Video
https://files.cloudbasis.nl/yAhu8/laqurOLu46.mp4
Log message (what I could find)
Jul 10 22:50:21 <REMOVED> - - [10/Jul/2023:20:50:21 +0000] "POST /api/PhotoEditor::rotate HTTP/1.1" 500 91 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/<REMOVED>"
Diagnostics
https://paste.cloudbasis.nl/?f1c5965508406608#AFSYmUCVEHhNuNqa4Avk54UDoGqUeSNY3H29LM583Xy5
Is anybody able to reproduce this? If so, Ill go upstream to create an ticket. Meanwhile Ill restore my backup and leave the rotate function alone for now.
-
When viewing the diagnostics I noticed that I had some permission issues.
Tried to fix that via CLI php /app/code/artisan lychee:fix-permission --dry-run=0
But I think I cannot do that due to the read-only file system?https://paste.cloudbasis.nl/?34a6d73d92805d78#36AR6STpiHDMsqbuN6RxpUBn7w8X3nvKiukjPzT7cpLn
-
When I rotate some files, it shows an error in the UI. But the picture itself gets rotated fine and even the backend returns 200. It seems the UI is timing out and thinks it's an error. I can't reproduce the emptying out/deleting all files though (this seems dangerous). If this is reproducible, I would report it upstream for sure.
-
This is the error I see, but despite this the file is rotated.
-
Yeah, I have to do some more research.. I'm gonna install Cloudron on a different VM and try to reproduce it with different ways of my setup.
Maybe it's because of the permissions issues I have.. Because I've imported all of my photo's via FTP and then use a custom script to import them..
https://git.cloudbasis.nl/randyjc/Cloudron/raw/branch/main/lychee-sync.sh
I'll do some more digging, and if I find something Ill report back
-
@randyjc said in Bug: All Photo's being deleted when using rotate button:
Tried to fix that via CLI php /app/code/artisan lychee:fix-permission --dry-run=0
I have fixed this now in the latest package. With the perm fix, the rotation issues also seem gone. Can you try after updating?
-
@randyjc said in Bug: All Photo's being deleted when using rotate button:
https://git.cloudbasis.nl/randyjc/Cloudron/raw/branch/main/lychee-sync.sh
To be clear of perm issues, maybe you can run artisan as
sudo -E -u www-data php /app/code/artisan
. That's how the package does it. You can see https://git.cloudron.io/cloudron/lychee-app for reference. -
-