"Refresh the Database" does not work as I would expect. Because it reset all records in the images table, e.g. the title becomes image name, the sorting is gone, the link to the tags does not work anymore and... This is not a garbage collection, it's a kind of a reset function! If this behaviour is correct, please rename the button!
Comments
It examines the database, removes orphaned records (ones where the file no longer exists). It also cleans up invalid records such as those where the file name starts with a slash or has double slashes, etc.
If some of those invalid records did contain your titles, etc. then they may well have been discarded. But they were not valid records to start with.
You can, of course, restore your database from a backup and manually fix those records.
Again--reload from your backup (you did make one, didn't you?) and manually correct the database entries.
I use tu re-enter after each refresh the title of each image and also the album title.
If i have "Musées du Monde" as dynamic album, i rename it as "musees" for example, then after i meet the problem.
Can you specify "good" metadata for you ?
Anway, this is for sure not your issue and I can only repeat what sbillard already said above. I cannot reproduce any issues.
Refresh database (garbage collect) does not cause any metadata refresh directly. But certainly if the garbage collect detects flawed database records and removes and then Zenphoto re-discovers the album the database record will be recreated correctly. There are two possibilities here since you were far from clear as to what you did. If you renamed the folder on your file system then Zenphoto would consider it a new album of course.
It is also possible that your file system has difficulties with files with diacritical marked characters. This is often the case when the file system is UTF-8 and you have not told Zenphoto.
ZP 1.4.5.5
Press "Set as thumbnail for" in edit images in the backend-> ZP generates wrong records in album/images table (leading/trailing slashes in names) -> remove them manually in the DB -> ZP generates new invalid records, when I view the gallery again
Update from 1.4.5.5 to 1.4.5.7 (last build from github)
First try:
Starting setup process to update to new version (no errors) -> Album/images table looks ok -> View gallery -> Album/images table completely rewritten (new id’s, all manual text gone, link to tags table become invalid, etc)
Second try:
Starting setup process to update to new version (no errors) -> Album/images table looks ok -> remove just the invalid album records with leading or trailing slashes in DB manually and leave images table untouched -> View gallery -> Album/images tables are untouched by ZP, everything looks good -> Press "Refresh the Database": ZP found the wrong image records and removed them -> DB ok (no invalid records), Gallery look ok
It seems that ZP has problems with DB records containing leading/trailing slashes in albums. In this case it rewrites the entire album/images table, at least on my system...
Please create a ticket so sbillard more easily sees it later.
Also you seem to miss the normal suggestion that if you are having a problem you should at least try to see if the support build corrects it. You can do this either by installing it or by perusing the changes to the release to see if anything fits.
I've got the same problem with some albums name in my DB, Zenphoto adds a slash before some of them.
As suggested, I remove them manually because they only appear in the search results.
I've noticed that they are created at the same time than the regular named albums.
Zenphoto 1.4.5.7
MySQLi : 5.1.67
PHP : 5.3.22
encoding : fr_FR.UTF8
This is weird. I'd like to prevent it to happen again.
as mentioned above, my ZP version is a 1.4.5.7 one (updated step by step from a 1.4.5.2 fresh installation).
Stephen, as mentioned above, I gave some informations about my settings,
here they are again :
Zenphoto 1.4.5.7 [59c22b2fba]
MySQLi : 5.1.67
PHP : 5.3.22
encoding : fr_FR.UTF8
theme : lightly modified ZPskeleton
would you mind saying to me what do you need to go further ?
So, after you have cleaned your database manually, what was it that causes a new wrong item to appear?
Since my last message, other duplicated albums have been created (with a slash before their names).
Maybe something about the cache ?
Or maybe if a thumbnail is manually selected by the user ?
For example, in the database I get this :
album01/albumtitle title:a:1:{s:5:"fr_FR";s:19:"Album TITLE ";}
and created at the same time I get this :
/album01/albumtitle title:albumtitle
Anyway I have no errors about that in the debug log but I get that :
`
{64956:Thu, 21 Nov 2013 20:34:46 GMT}
WARNING: Cannot modify header information - headers already sent by (output started at /home/XXX/public_html/zp-core/lib-GD.php:114) in /home/XXX/public_html/zp-core/functions-image.php on line 30
header called from imageError (functions-image.php [30])
from cacheImage (functions-image.php [493])
from i.php [165]
{64956:Thu, 21 Nov 2013 20:34:46 GMT}
WARNING: Cannot modify header information - headers already sent by (output started at /home/XXX/public_html/zp-core/lib-GD.php:114) in /home/XXX/public_html/zp-core/functions-image.php on line 31
header called from imageError (functions-image.php [31])
from cacheImage (functions-image.php [493])
from i.php [165]
{64956:Thu, 21 Nov 2013 20:34:46 GMT}
WARNING: Cannot modify header information - headers already sent by (output started at /home/XXX/public_html/zp-core/lib-GD.php:114) in /home/XXX/public_html/zp-core/functions-image.php on line 32
header called from imageError (functions-image.php [32])
from cacheImage (functions-image.php [493])
from i.php [165]
`
Last : it only happened to albums of a connected uploader since the last database clean up today.
I do not understand "connected uploader", but that is probably the key information since it seems to be the source of the problem.
Also you can install the latest support build [550e100083] as I have added some more debugging of this problem which might help.
by "connected uploader" I mean regularly registered users who have the right to edit their own album and to upload pictures.
It seems that this happens only after these users edit or upload some pictures.
I'll give a try to this release and let you know.
Thank you.