Advanced search  

News:

cpg1.5.42 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.36, cpg1.5.38 or cpg1.5.40 you don't need to upgrade. If you are running an older version than cpg1.5.36, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1]   Go Down

Author Topic: Possible bug - Deleting old pic:empty token still remains in the thumbnails list  (Read 3247 times)

0 Members and 1 Guest are viewing this topic.

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: it
  • Offline Offline
  • Gender: Male
  • Posts: 248
    • 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, 02:45:21 PM by flapane »
Logged

Αndré

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

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: it
  • Offline Offline
  • Gender: Male
  • Posts: 248
    • 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: 15039

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: it
  • Offline Offline
  • Gender: Male
  • Posts: 248
    • 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: 15039

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: it
  • Offline Offline
  • Gender: Male
  • Posts: 248
    • 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: it
  • Offline Offline
  • Gender: Male
  • Posts: 248
    • Flavio's page

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

Page created in 0.064 seconds with 19 queries.