JoomGalleryfriends / JG4-dev

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

[Category] Copy a category does not copy the corresponding image records #157

Closed AlexanderSupp closed 8 months ago

AlexanderSupp commented 1 year ago

The marked categories are copied. A category with the addition “(0)” in the name is created at the same category level. The images in the physical file folders are also copied. The number of images copied with it is not displayed in the category overview. The pictures are also not included in images. However, all images are available in the “details, originals, thumbnails” directories. Now, when I try to delete this orphaned category, I logically get the error message "Category folder named 'categoryname-0' could not be deleted because files and subfolders still exist."

Elfangor93 commented 9 months ago

When copy a category it successfully copies files and directories, but not the image record in the databse leading to this strange behavior.

AlexanderSupp commented 8 months ago

What do we expect if we copy a category? What happens with the subcategories? Are they copied too? Make it sense to copy all images to the new categories? When will I use a copy function within categories? Make it sense to duplicate the same images? In my opinion, it is easier to leave out this copy function because the programming effort is disproportionate to the benefit. Then we can also close this issue.

MrMusic commented 8 months ago

What do we expect if we copy a category?

I would expect only the current data set to be copied. No images, no subcategories.

DE: Ich würde erwarten dass nur der aktuelle Datensatz kopiert wird. Keine Bilder, keine Unterkategorien.

AlexanderSupp commented 8 months ago

DE: Ich würde erwarten dass nur der aktuelle Datensatz kopiert wird. Keine Bilder, keine Unterkategorien.

Dann gibt die Funktion (Batch, Duplicate) keinen Sinn, da ich dies auch mit einer Neuanlage erreichen kann.

MrMusic commented 8 months ago

Dann gibt die Funktion (Batch, Duplicate) keinen Sinn, da ich dies auch mit einer Neuanlage erreichen kann.

Nicht ganz: Bei Neuanlage sind alle Felder leer. Beim Kopieren werden alle bereits vorh. Daten (Titel, Beschreibung, Params...) übernommen.

AlexanderSupp commented 8 months ago

Nicht ganz: Bei Neuanlage sind alle Felder leer. Beim Kopieren werden alle bereits vorh. Daten (Titel, Beschreibung, Params...) übernommen.

Natürlich, so kann man das auch sehen. Dieses Issue habe ich nur aufgemacht, weil die Funktion nicht vollständig bzw. fehlerhaft umgesetzt wurde. So konnte es nicht bleiben. Mit dem, was jetzt durch den PR #179 umgesetzt wurde, kann ich leben. An dieser Stelle drehen wir uns im Kreis. Diese Funktion könnte auch in einem späteren Release umgesetzt bzw. ausgebaut werden.

Elfangor93 commented 8 months ago

Close this issue since PR https://github.com/JoomGalleryfriends/JG4-dev/pull/179 fixed this issue...