We have recently implemented a new tool to analyze the "upload" directory of all Piwigo installations hosted on Piwigo.com. We were looking for missing or unexpected files. As an interesting side-effect, we have discovered a few photos had a "duplicate path". It means 2 photos in your Piwigo interface are actually related to the very same file on the filesystem. It happens on 2 cases :
* if you have the same photo added with the same synchronization in different directories of "galleries" and then you ran Virtualize plugin before its version 15.a (february 2025)
* or if you upload twice the same small photo in the same second
We knew the problem about Virtualize, this is why we fixed it months ago by "deduplicating" files when moving to the "upload" directory. I personnaly thought the problem was limited to this specific case. The analyze of millions of files on Piwigo.com showed us the second issue occured sometimes.
Piwigo 15.6.0 will detect those duplicate paths and display a warning if you have any. Plugin Check Uploads is ready to handle this situation and will deduplicate files if you ask for it.
Background image by Atypeek Dgn on Pexels
Piwigo 15.6.0 release note
Offline
Is there a log for the duplicates? I got the message about duplicates and ran the plugin and it found two and fixed them. But it still says "We have found 7 duplicate paths. Details provided by plugin Check Uploads" I went back to the plugin and it says "Well done! Everything seems good :-)"
I have imported from /galleries and done the upload method for adding pictures. Maybe the cleanup tool is only looking at uploads and not in /galleries ?
Thanks
Offline
banditsc wrote:
I got the message about duplicates and ran the plugin and it found two and fixed them. But it still says "We have found 7 duplicate paths. Details provided by plugin Check Uploads" I went back to the plugin and it says "Well done! Everything seems good :-)"
Can you go into your database manager (PHPMyAdmin maybe) and perform the following SQL query:
select path, count(*) from piwigo_images group by path having count(*) > 1;
I also suspect something I have found on Piwigo.com accounts analysis : if you have paths :
./upload/2024/12/24/20241224154812-abcde1234.jpg
and
./upload/2024/12/24/20241224154812-abcde1234.JPG
Then the warning in Piwigo core will tell you there is a duplicate path but plugin Check Uploads will tell you everything is fine (and the plugin is right)
Offline
They are in my galleries directory and not the uploads..
./galleries/2009/09errtech/DSC_0070.jpg 2
./galleries/2009/09errtech/DSC_0071.jpg 2
./galleries/2009/09errtech/DSC_0072.jpg 2
./galleries/2009/09errtech/DSC_0073.jpg 2
./galleries/2009/09errtech/DSC_0074.jpg 2
./galleries/2009/09errtech/DSC_0075.jpg 2
./galleries/2011/11mboktoberfest/DSCF0965.JPG
Offline
OK, so you are right. You have duplicates in the "galleries" directory. The Check Uploads plugin does not check the "galleries" directory.
If you have "./galleries/2009/09errtech/DSC_0070.jpg" it means you have run synchronization twice in parallel. I guess. Another side effect I hadn't anticipated! This filesystem check is very interesting.
We're going to think about a way to fix this problem for a next release. For now, do not delete photos concerned by duplicate paths.
Offline
I have the message:
We have found 1 duplicate paths. Details provided by plugin Check Uploads
in the header of the admin pages.
I performed a search - the plugin found 1 duplicate in the upload folder. I deleted it, but the message still existed.
A new search shows:
Gut gemacht! Alles scheint gut zu sein :-). (no problems!)
There are no files in the upload folder. I deactivated and removed the plugin, but the message is still there.
How can I get rid of this?
Offline
I also have my images outside upload - like:
galleryname1
galleryname2
galleryname3
galleryname4
ect.
I sync every gallery if I have uploaded new images.
--------------
I got the error message with 3 images - but I had 14 path errors
A question - when this module fix the problem - how does it do it?
I added (sync) the 11 new images and updated those with the comments and hits
Offline