Page 3 of 3

Re: Multiple add creates duplicates of everything

Posted: 21 Aug 2015, 00:45
by Jan
Hi, in this topic, there are different errors, so maybe this confuses me. Did you make an migrate? Maybe the path to files is wrong so the images are duplicated :idea:

Jan

Re: Multiple add creates duplicates of everything

Posted: 24 Aug 2015, 13:21
by Meta11icA
No, it's a clean install on a clean Joomla. The image paths are OK.
Check the print: http://i.imgur.com/4PzAFSB.png
It's the same image with the same path and it's displayed 3 times in the same category.

Re: Multiple add creates duplicates of everything

Posted: 29 Aug 2015, 00:05
by Jan
Hi, I see, but I see different IDs (large distances): 45, 212, 520 so this seems like the same images were added to the system but more times in time? Which is the date between the IDs :idea:

Jan

Re: Multiple add creates duplicates of everything

Posted: 29 Aug 2015, 10:15
by Meta11icA
Yes, I have several categories on that site, in all the categories hundreds of new pics need to be added almost daily. After we upload the new images to a category and we use the select all option, all the "old" images are added again to the category thus creating the duplicates. :( I don't think this is normal behavior.

Re: Multiple add creates duplicates of everything

Posted: 29 Aug 2015, 21:34
by Jan
Hi, it depends on if you select other category or you change the category name.

- if you user multiple add and you have selected category, then the images will be added newly as they go to new category
- or if you have changed the name of category (folder) then the images which were added in past are added again but to new category (when you select whole folder) :idea:

Jan

Re: Multiple add creates duplicates of everything

Posted: 30 Aug 2015, 12:35
by Meta11icA
Ok, let's say I create category "A" in the back-end, and I create folder "1", where I upload 10 images using the multiple add tool. After I've uploaded the images, I use the select all option and add the 10 images to category "A". One day later, I upload another 10 images to folder "1", so now it has 20 images, I use the select all option to add the images to category "A" and I end up with 30 images in category "A", from which 10 are duplicates. I don't change folder/category names in this process. This is my problem...

Re: Multiple add creates duplicates of everything

Posted: 30 Aug 2015, 20:57
by Jan
Hi, multiple upload function does work with folders not with categories, see example (you can test it)

Create two folders on your server in images/phocagallery folder, e.g.:

Abc
Def

and upload images to them, e.g. 001.jpg image so you have this structure:

Folder Abc - Image 001.jpg
Folder Def - Image 001.jpg

Now go to Multiple Add function and select both folders (Abc and Def - but don't select any category) - if you click on Save and Close, you get the following:

2 categories made, 2 images added.

Now do the same, select both folders and click on save - now you get:

0 category made, 0 image added

If you change the title of the Category Abc to Abcd and you go to multiple upload and select Abc and Def folder, you get new category there "Abc" (one category - one image) - so you now have Abc, Def, and Abcd

Multiple upload function is a way to import easily and quickly images to the gallery but if you:

- change the name of category (then it is different to folder name and the folder name will be transformed to new category)
- select the category (then it does not more compare folder name and category name and will do duplicates)
- don't change the category name and folder name - such then will not create duplicates

So in this case, selecting the category means, the image will be not ignored but duplicate will be done - but if you select whole folder, duplicates will be not created.

Jan

Re: Multiple add creates duplicates of everything

Posted: 30 Aug 2015, 23:22
by Jan
See image:
Image

In Phoca Gallery, there is independent database and filesystem layer. This means that image can be stored on server in different places without losing connection to its category, example:

Image 001.jpg is stored in folder "001" - you use multiple add function and this image will be added to system: Category 001, image 001.jpg Then you move the image to category 002 but the path to the image is unchanged images/phocagallery/001/001.jpg

So this means, in Phoca Gallery images stored on server (filenames) and their path is indepentend to database (category).

And this is why the multiple add works as written above:

- if images are selected including folder, then they will added to the system - if there is the same folder name and some images inside it - only new images will be added.
- but if you select category then the image will be added (like it is duplicate but it is not - it gets new ID) - this is because new image cannot overwrite some old which is used in other category (hypothetical).

Jan

Re: Multiple add creates duplicates of everything

Posted: 01 Sep 2015, 11:54
by Meta11icA
Dear Jan,

Thank you very much for taking time to explain the mechanism to me, now everything is clear, I've remade my gallery with the new knowledge and now everything is working as expected. It's great to know that there are still people actually offering support for their products.
Thank you again and keep up the good work!

Re: Multiple add creates duplicates of everything

Posted: 04 Sep 2015, 00:49
by Jan
Ok