Advanced search  

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

Pages: [1]   Go Down

Author Topic: Can't remove non-existing pictures from non-existing Album directory.  (Read 15899 times)

0 Members and 1 Guest are viewing this topic.

JasonB

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 37
    • The Big Squiff

This may seem silly, however I think it's a problem.  If I delete a picture, and its thumbnails, from disk and then go to the album to remove it from the gallery all is well (it does it, after having first displayed just the picture title rather than a thumb).  But if I delete the entire directory from disk, then go to the Album and try to delete a picture (or all pictures) I get the following error: "Directory 'albums/[Category]/[Album]/' is not writable, files can't be deleted", where [Category] and [Album] are replaced by the actual directory names.

Why does the deletion succeed if all of a picture's files are missing, but fail if the directory itself is missing?  What is it trying to do differently in both circumstances?  In any case, if the file isn't there for whatever reason, then it should silently (without an error) simply remove the entry from the gallery.

Note: I know that it makes more sense to just delete directly from the gallery itself.  However, I came across this because I'll frequently rename files.  To do this, I move the files elsewhere (so that they aren't "really" deleted), delete them from the gallery, rename the files, move them back, then batch add them in again (with the new filenames).

It would be nice if there were a "remove from gallery" option that would be like delete, except that it wouldn't touch the file system itself - rather it would just take the entry out of the database...
« Last Edit: August 07, 2005, 09:53:54 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Can't remove non-existing pictures from non-existing Album directory.
« Reply #1 on: August 07, 2005, 09:53:43 am »

you're not meant to remove files physically (using FTP) once they exist in coppermine's database. Please refer to the docs. Makring as "invalid"
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223

Very true on the no deleting of files via FTP - However, I have the same problem, as I deleted my albums directory.. 

Easy way to fix the problem of deleting it appears, is to go to edit the properties of each album, scroll to the bottom and click the remove all files from the album.  NEXT, you can delete the album on the next step.. Without deleting the files (that are not there), you cannot delete the album..

Kinda weird you have to do it in 2 steps, rather than just with the album admin and deleting the albums.  If the pics are missing, it will not let you do it any other way...
« Last Edit: July 09, 2007, 05:58:20 am by skidpics »
Logged

Dia

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

Thanks Skidpics. I made the same mistake, I guess you don't know it's one until you get the error message, but I followed your advice and got it fixed. You go to album properties, all the way down to irreversibly delete files and once it allows you to do that you can delete the entire album.

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

Locking.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 18 queries.