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: Possible bug - Deleting old pic:empty token still remains in the thumbnails list  (Read 13354 times)

0 Members and 1 Guest are viewing this topic.

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page

I've just downloaded a quite old image (uploaded probably with cpg1.3).
I got a message stating that the original/medium/thumb JPG files have been deleted, but the "image" couldn't be removed.
In fact, now the album displays an empty token for the deleted image. It also displays the total visits (73), as shown in the attached file (2.PNG).

I tried to search for the pid of the image (173) in the cpg_pictures sql table, but I couldn't find anything, as shown in the other attached file (1.PNG). PIDs 172 and 174 are present, but 173 isn't, which should be the expected behaviour, if one deletes that image.

I also tried a wider research in the sql dbase, but it didn't give any results for that pid:
Code: [Select]
SELECT *
FROM `flapanec_db`.`cpg_pictures`
WHERE (
CONVERT( `pid`
USING utf8 ) LIKE '%173%'
)
ORDER BY `cpg_pictures`.`pid` ASC
LIMIT 0 , 30

In order to solve this, I manually had to type the URL of the (partially) deleted image, and click on DELETE FILE another time. It still said that it couldn't remove the image from the album, as shown in attachment 3.PNG, but it eventually removed the empty token from the thumbnails list.

I'm pretty sure that this doesn't happen with pics uploaded recently with cpg 1.5, because I've deleted some images in the last months, and no empty token remained in the thumbnails list.
« Last Edit: February 01, 2015, 01:45:21 pm by flapane »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

I've just downloaded a quite old image (uploaded probably with cpg1.3).
I assume this should read
Quote
I've just deleted a quite old image
?

Do you have a backup of your database and files and can reproduce that issue on exactly that image? If not, I think this will be classified as "shit happens", as I don't think this is related to when the picture has been uploaded (with whatever version) ;)
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page

Sorry, that's of course a "deleted", I've no idea why I wrote "downloaded".  :D

I do have a backup, but for now, just for sparing time (as of now I can't upload the old dbase, I should set up a local sql server), I tried with another (old) image in the same album: it still materially deletes the JPG thumb/intermediate/normal files, and it says that the "image in the album" can't be deleted (red circle icon, first from the right), as shown in the attachment 3.PNG I previously attached.
However, this time it doesn't show an empty token in the thumbnails list, so the final result looks good.
Still, I'm not sure why the "image in the album" can't be deleted and the icon is red, and if this is the expected behaviour.
I thought that it was worthwile to report what happened.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

I'm not sure why the "image in the album" can't be deleted and the icon is red, and if this is the expected behaviour.
That's of course not expected behavior. Obviously it got deleted in the database (= get deleted in the album): 1.PNG. Regarding pid 173 and 2.PNG, this is maybe some kind of weird cache behavior?

If Coppermine tells that the image couldn't get deleted from the album (= database record), 2.PNG would be expected result. But as you proved in 1.PNG, it actually got deleted from the database.

I've currently no clue why this happens. I need to review the code, but I've no more spare time today.
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page

The cache (which I've just emptied) could be a good call for the "ghost" empty token after having deleted the image, as I'm not able to reproduce it anymore with other images.

After having wiped the cache, having re-uploaded the latest cpg version and having logged out, I tried to delete another couple of images, and I can confirm that the red circle icon still appears, even if no visible issue pops up.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

I tried to delete another couple of images, and I can confirm that the red circle icon still appears

Fixed in SVN revision 8770. I added this glitch in SVN revision 8223 (3.5 years ago :o). Thanks for the report, feel free to verify the fix :)
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page

Thanks for keeping cpg alive and kicking, can't wait to try it as soon as SF returns back online. :)

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page

It works great. ;)
Thanks
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.