Hi guys, hoping somebody might know what I can do to fix this. If I check out my gallery statistics, about halfway down the page I get a large paragraph of a string of these errors:
The album Places/Florence/DSCF2959.JPG cannot be found.Error: The album Places/Jordan/IMG_0315.JPG cannot be found.Error: The album Places/England 2000-12/Dscf1553.jpg
I also use the zenphotopress plugin for Wordpress, and in the album list in that plugin, the same list of rogue "albums" shows up. These aren't albums, of course, they're just picture files (that do appear in the album in question) that somehow got listed somewhere as albums.
Refreshing the database via the admin overview doesn't fix it, and these picture-albums don't show up in the albums list of the admin page or the folder list on the server. It seems to just be a database thing. Any ideas on what happened, or how I can prune these "albums" out?
Thanks!
Comments
Please always tell us which Zenphoto version you are using. If it isn't 1.2.5 please upgrade.
I will take a gander at it through phpmyadmin; I've been in it before, but not often, because I don't know enough about databases not to screw them up. Hurrah for backing things up first.
Thanks for the advice, I'll let you know how I fare.
Change line 341 of class-gallery.php to `if (!is_dir($albumfolder.internalToFilesystem($row['folder'])) || in_array($row['folder'], $live)) {` Changes from `file_exists` to `is_dir`. that should let you clean out the DB.
As to how these came about. There is a similar oversite in the class-album script. So perhaps you are doing a `New Album()` passing the image name rather than the image basedir.
I've never altered the code before, so I'm not sure how these errors slipped in. I've created new albums since, with no resulting errors, so it must have been a temporary hiccup. The errors would have been generated a few versions ago, but I had thought it was an issue with the Wordpress plugin, since that's the only place I saw them until now.
Thank you so much for looking into this and offering the solution.
We have seen that some editors seem to count differently from others. I normally use circa with line numbers for that reason. Just did not do so in this post.