Tag totals incorrect after editing album

I'm using the current version of Zenphoto. I used the Albums -> [album name] -> Album Title: field to change the title, and the radio button to rename the directory to match (but lower case, hyphen separated).

After doing this, tags for the images within that album ceased to work. Checking the images, they had lost all their tags. The tag cloud still showed the correct total for those tags, but clicking it would yield no results. After retagging each image, the tag search works again, but the totals are now doubled. For instance where there were 35 results (one of which was a dynamic album) it now reports 69. There are in fact only 34 images with that tag.

Checking the database, there are twice as many rows for that tag ID as there should be. There is no indication which I should delete, why they weren't deleted when the tags were lost (which is the bug, I guess), unless I can just delete the 34 tags with the lowest IDs?

Comments

  • If you run the database refresh script it will remove orphanded database items.

    As to the loss of tags, I do not know. I did a quick test of your scenerio and the tags did not get lost. Nor should they since they are based on the objects ID, not its name or other property.

    Perhaps there was some script error? If the folder rename changed the the name on disk but failed afterwards Zenphoto would think the album a new album.
  • Well, I can tell you that the new album title didn't stick, it used the new directory name, so I had to change the title again separately. I got no errors, no page timeouts, or anything like that.

    I have run both the refresh metadata and refresh database functions, twice each, and no improvement. It's not removing the orphaned tag records.

    I'm pretty sure that it does consider this a new album, as the images have new IDs. It's looking like there's no easy way to clean this up, besides grubbing around in the db for the tag records that don't correspond to any existing object.
  • There is a bug in the garbage collection that did not delete the orphaned tag assignments. That is fixed in the 1.4.2 Beta (tonight's build)

    But the problem you are having with renaming the folder is not reproducable.
Sign In or Register to comment.