Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Wierd image filename issue?  (Read 4188 times)

0 Members and 1 Guest are viewing this topic.

rahl

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Wierd image filename issue?
« on: June 10, 2006, 09:01:15 am »

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.
« Last Edit: June 10, 2006, 10:22:40 am by rahl »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Wierd image filename issue? (1.3.3 to 1.4.8.)
« Reply #1 on: June 10, 2006, 09:22:51 am »

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.
Logged

rahl

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Wierd image filename issue? (1.3.3 to 1.4.8.)
« Reply #2 on: June 10, 2006, 09:29:50 am »

To 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. :)
Logged

rahl

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Correction
« Reply #3 on: June 10, 2006, 10:19:55 am »

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?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Wierd image filename issue?
« Reply #4 on: June 10, 2006, 10:34:33 am »

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.
Logged
‍I don't answer to PM with support question
Please post your issue to related board

rahl

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Wierd image filename issue?
« Reply #5 on: June 10, 2006, 12:33:13 pm »

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?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Wierd image filename issue?
« Reply #6 on: June 10, 2006, 12:45:10 pm »

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

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Wierd image filename issue?
« Reply #7 on: June 10, 2006, 01:07:09 pm »

Backup before doing so, and replace 'cpg148_' with your prefix, then apply using the SQL tab in phpMyAdmin:
Code: [Select]
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.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.