JoomGalleryfriends / JG4-dev

Development repository for JoomGallery v4.x
GNU General Public License v3.0
10 stars 7 forks source link

Folders of categories are not deleted #162

Closed MrMusic closed 9 months ago

MrMusic commented 11 months ago

When deleting categories, the folders remain in the filesystem.

Steps to reproduce the issue

Create a category with title 'abc'. ->The category will be created correctly in the database and in the filesystem.

Try to delete the category 'abc' ->The category will be deleted in the database. ->The folders remain in the filesystem

@Elfangor93: I suspect the error in the function 'getCatPath' respectively in the '$this->component->getFilesystem()->cleanPath' of FileManager.php used there. Strange: The function 'getCatPath' returns a corrupt path for thumbnails: '/images/joomgallery/thumbnails\abc' becomes '\images\joomgallery humbnails\abc'.

But for originals and details the path is ok: '\images\joomgallery\details\abc' '\images\joomgallery\originals\abc'

System:

OS: Windows PHP 8.1 DB: 10.4.27-MariaDB

AlexanderSupp commented 11 months ago

Joomla version 5.0. Provider Domain Factory, PHP 8.1, Maria-DB. I tried to reproduce this issue. So I created a category “ABC”. I added an image. And then I tried to delete the image. The result was: Screenshot 2023-10-30 190832 But all 3 images were stored in the files correctly. I tried it a second one with the same result. All images are stored. The test were performed with code Update control panel #149 I repeat my test tomorrow.

AlexanderSupp commented 11 months ago

I now can confirm the issue. I created a category and after than I deleted this category. The result in Joomla 5 are below: Screenshot 2023-10-31 112338

Elfangor93 commented 9 months ago

Issue is resolved by PR https://github.com/JoomGalleryfriends/JG4-dev/pull/166. Close this issue.