Wierd image filename issue? Wierd image filename issue?
 

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

Wierd image filename issue?

Started by rahl, June 10, 2006, 09:01:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rahl

After upgrading to 1.4.8 I have found that most of the links from the intermediate normal_lastname_firstname.jpg to the original lastname_firstname.jpg on a displayimage.php page are broken.  It may be is a prexisting issue that has never been noticed but I don't think so.

Gallery: http://jillscastingagency.com.au/gallery/

non-administrator login
Username: test
Password: test

If anyone needs an admin login, let me know here and I'll PM you.

It appears that the underscore has been dropped from the filename field in the database in all but a handfull of cases.  All original uploaded photo's include an underscore (i.e. lastname_firstname.jpg), are batch added to the gallery and retittled using Admin Tools\Remove the .jpg ending and replace _ (underscore) with spaces.  The original jpg files still exist as lastname_firstname.jpg. No photo's have been added since the upgrade.

An example of a broken link is here. Clicking the intermediate picture links to:
http://jillscastingagency.com.au/gallery/albums/Male/Adamopoulos%20Billy.jpg
but the proper link is:
http://jillscastingagency.com.au/gallery/albums/Male/Adamopoulos_Billy.jpg

An example of a working link is here. Clicking the intermediate picture correctly links to:
http://jillscastingagency.com.au/gallery/albums/Male/Edmonds_Paul.jpg

Additionally, doing a batch add ticks all those existing photo's with underscores missing from the database as new photo's, which is why I think this is related to the upgrade. It would have been noticed during the last upload.

Thanks for any help.

Paver

I have a client whose gallery seems to have a similar problem.  However, unlike your case, his original files had spaces in them.  He was used to 1.3.x leaving those spaces alone, and he was a little peeved when 1.4.x replaced the spaces automatically on upload with underscores.  I haven't gone through all his photos yet, but I've seen some here & there that are linking to original files incorrectly.  The link has a space in it, where the filename has underscores (because Coppermine put those in).

The thumbnails & intermediates display fine, the original sized photos don't, because of that incorrect link.

Strangely enough, the thumbnails & intermediates have the original spaces in them; it looks like those spaces were never converted to underscores.

I haven't spent the time to figure out why, but I need to this weekend.  When I do, I'll use your gallery as another example (along with your details - thanks for providing a careful record), and figure out what's going on.  He or I never used the Admin tools to rename the title, so I'm not sure if that's related, but I'll see.

To be clear: for your case, things most likely were fine in 1.3.3?  You upgraded to 1.4.8, see this issue, and have not added any files since the upgrade?

These might be two different issues based on the filenames used and the order of operations, but they are certainly functionally similar, so I would like to address both.

rahl

Quote from: Paver on June 10, 2006, 09:22:51 AMTo be clear, things most likely were fine in 1.3.3.  You upgraded to 1.4.8, see this issue, and have not added any files since the upgrade?
That is correct. If need be, I could go through the database and fix the records manually but I'd like an easier fix if it's available. :)

rahl

After checking through the database dump I did prior to upgrading, it is apparent that this issue was pre-existing.  I don't normally do the photo uploading so I can't tell when the problem first occured though I would guess it's only recent.

Could an admin move this to an appropriate forum?

Sami

usualy it happen when you use remote MySQL Client such as "MySQL Administrator"
some times this tool change some character when it's restore backup file to DB (mostly if you use diffrent language with windows).
if you did backup with mysql client romotly , I think it is better to restor it with phpmyadmin.
‍I don't answer to PM with support question
Please post your issue to related board

rahl

The database has only ever been backed up up using phpMyAdmin and has never needed to be restored. I can't understand how this occured but what would be the best way to fix it? As I see it, I need to replace the spaces with underscores in the database filename. Could I edit the filename field under the cpg11d_pictures table using phpMyAdmin without damaging the database or is there another way?

Sami

Sorry, In this case you should manualy update prefix_picture table of DB
But first take a backup this time ;)
‍I don't answer to PM with support question
Please post your issue to related board

Paver

Backup before doing so, and replace 'cpg148_' with your prefix, then apply using the SQL tab in phpMyAdmin:
UPDATE cpg148_pictures SET filename=REPLACE(filename,' ','_') WHERE 1;

I usually test queries first with a "LIMIT 1" at the end (before the semicolon) while looking at the first record I expect to be affected, if I can guess at such.

That is, if you are sure you don't have any spaces that are supposed to be in filenames (i.e. that Coppermine expects to be in there) . . .

Based on your report, I wonder if the problems I'm seeing are also from before the upgrade to 1.4.x.  In any case, your thread belongs on the 1.3 board.  I'll post separately if it turns out my problem is due to a 1.4 issue.  But I'm guessing it's a 1.3 one as well.