Batch Upload (bug) - After Upgrade Batch Upload (bug) - After Upgrade
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Batch Upload (bug) - After Upgrade

Started by celian, November 24, 2005, 02:21:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

celian


Third topic in a minute I know, but I always have a lot of ideas just in the beginning. Later on i tend to accept stuff more easily and hope that it'll work by itself later on..

This time I was wondering why, after my upgrade from 1.3.x to 1.4.2, when "batch adding files" it is as if Coppermine has forgotten what pictures I already have in my collection?

To explain: Previously if I had a 100 files added from within a folder to my albums, added 1 file to that folder and then selected it from within "batch add files", only the 1 new picture (not already in the DB) would be tagged for adding - just the way I liked it.

Now, when I add a new image to the folder and use the batch add function, images are selected at (apparently) random, with only some of the new ones selected, but also lot of the old ones. Tried with an existing folder, and all the pictures (already in db) were automatically selected..

Is there a way for me to fix this by myself somehow, as I use this feature a lot, and would love for it to work as previously (without deleting the database and re-entering everything (assuming that it would do the trick)?

- Celian

Joachim Müller

This is not expected behaviour - the behaviour of the pre-selection of the checkboxes is not meant to change from cpg1.3.x to cpg1.4.x. Post a screenshot and a link to your page please.

celian


As requested, my album page is at http://www.celian.dk/album

Mr_Anderson

Here is what I have when trying to Batch add pictures:
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.demitch.net%2Ferror.jpg&hash=dc22643151770e7e17e7f15afaec59b69662db95)

Joachim Müller

@celian: PM me an admin account if you want me to take a look.

Joachim Müller

OK, using the admin account you PMed me as suggested, here's what I've discovered:

You claim that the file http://www.celian.dk/album/albums/celian/family_and_friends/Claus_i_80_erne.jpg is being checked in the searchnew.php page, while it is suppossed to exist in the database already on the page http://celian.dk/album/displayimage.php?pos=-363
This is not the case: the file that already is in the database is http://celian.dk/album/albums/celian/family_and_friends/Claus%20i%2080_erne.jpg - as you can see, the files differ: the one you already have in the db has spaces in the filename, while the one you're trying to add has underscores in it. This leads to the conclusion that you renamed the file after having added it to the gallery. You have to understand how the batch-add process works: :coppermine doesn't compare the files on a binary basis - all it does is compare the paths and filenames. If they differ (and they do in your case), coppermine will "think" that the file doesn't exist yet in the database and therefor pre-select the checkbox for you.
Bottom line: once a pic exists in coppermine's database, don't change the filename.
Your fiddling with the filename resulted in the intermediate pic being displayed just fine on the page http://celian.dk/album/displayimage.php?pos=-363 displays just fine, while the full-sized pic doesn't - you get a broken image.

So, this is not a bug, but a pilot error.

This is what you need to do to fix things: undo your editing of file names - rename them back to how they used to be when you uploaded the files in the first place and used batch-add.

Joachim

celian

#6
Thanks for checking!

Your answer prompted me to check, and it seems that the _underscroll vs. space is the problem in all the cases now part of this problem. - This leads me to believe that either coppermine previously interpeted the underscroll as spaces, or that something went wrong during the update process perhaps that changed the database entries (filename)??

- I just checked the original pictures on my harddrive, and found the following to be the problem:

Spacing - Where the original filenames would have them, and the server not (underscrolls instead): "Vestmannaeyjar (0).JPG" -> "Vestmannaeyjar_(0).JPG"

- Checked some more, and it seems that ALL the files in my album that previously had spaces in their filenames, now have underscrolls... When I try to batch add these folders, everything's checked.

I don't think this was a problem before I updated to 1.4.2 as I've been adding pictures every 2 weeks or so, and have never encountered this behaviour before now.

Plus I am certain that I have not renamed a single file since uploading (no reason to, plus I know I haven't touched a lot of those folders since uploading them), I really don't know what could have happened here..?

Joachim Müller

#7
coppermine definitely hasn't renamed all your files by itself, changing spaces to underscores, this is something it won't do.

celian


Didn't think so either, just wondering how this has happened.. Don't suppose that updating the database entries could have any effect on this? (By say, removing underscrolls in the filenames stored there..?)

But anywho, to fix this I think it's easiest for me to re-add the files, but in order to do so I'd like to delete them from my album first.

- Trying to find a way to do this without actually deleting the files from the server has proven to be a problem though, so I was wondering if you could give me a hint as how to do this?

I guess I could delete the database entries relevant to the album, but is this safe?

(I thought maybe I could do a search within cpg132_pictures for a filepath that matches the album, and delete all the entries, then re-add (but this would probably preserve the thumbnails+normal versions of the old filenames wouldn't it)