svn upgrade db problems

hello,

i've been using ZP 1.2.6 happily for many months. i'm having some problems upgrading to 1.2.8, though, and am hoping for any pointers from the community. some of the symptoms i'm seeing are that tags and comments are no longer associated with images, and image rotations have been lost.

here's what i've done so far:
my site is deployed from the SVN repo -- i'm not sure how much of an edge case that makes me. initially, i tried to update via svn sw, but i experienced svn/filesystem errors so i simply checked out 1.2.8 into a new working directory, copied over the images and config file, and ran setup.php . afterwards i had to massage the albums a bit, but i could see all of the images as expected.

however i appear to be missing quite a bit of "meta" data from the images: no tags are assigned to the images (though i can see the tags listed in the "tags" admin page); comments are not assigned to the images (in the "overview" admin page under "10 most recent comments" it says, e.g., "Bob commented on database error"); and if i click the "image info" link for a given photo all of the data is blank. on the admin side, the "Refresh database" or "Refresh metadata" utilities will start but fail to complete: e.g. i'm constantly returned to the "Database refresh is incomplete" screen.

does anyone have any troubleshooting ideas, or thoughts on more information i can provide?

the installation is at http://hieb.name/photos/ if anyone is curious.

thanks in advance!

-- andy

Comments

  • acrylian Administrator, Developer
    Did you really use the same database and the same table db prefixes for the new install?
  • thanks, acrylian.

    yes, i grabbed a new working directory from SVN, but then copied over zp-config.php from the old working directory. also, note that i can see data like comments and tags (on the comments and tags admin pages), and the tags even show the number of photos they're assigned to, but they're not correctly/visibly attached to any images.

    looking through the db, i don't see any obvious problems... can you (or anyone else) give me a quick rundown on how e.g. comments should relate to images in the schema (or point me to some documentation on it)?
  • acrylian Administrator, Developer
    There is a pdf with the database relations included in the release. I have no idea why the relations could break except that Zenphoto mistook the image/albums for new (as we are filesystem based). I am sure my collegue sbillard will respond later, too.
  • The order you do things like this is critical.

    You should first upload all your images, etc. Then "restore" the database. Then install the new version of Zenphoto. If zenphoto "detects" an image or album before you have copied your old database it will create new records for it and you will have confilcts/wrong associations with the IDs of these.

    It is possible that doing a "refresh database" will correct things, but I am not sure it can overcome all the problems.
  • thanks, acrylian and sbillard! i know it will be a while before i can get back to this, so i just wanted to say thanks for the comments.

    sbillard's note gives me some ideas for what i might have done wrong, so i'm going to try reverting back to the 1.2.6 site and database, then running through the upgrade process again.
  • @arh1, could you possibly share your findings? I would also love to know as I have similar issues...
  • hi everyone. i appear to have this working now!

    first, i restored my 1.2.6 site and database. then, the steps i took to successfully upgrade were:

    1) svn co of new version in new dir
    2) copy over my config file zp-config.php, but not the albums/photos!
    3) run the update script at /zp-core/setup.php
    4) finally, i copied my albums/photos from my old 1.2.6 dir to my new 1.2.8 dir

    however, the 'Refresh Metadata' and 'Refresh the Database' tools still appear to run indefinitely ("continuing" over and over) after the update. i hope that is not a symptom of deeper problems in my database.

    anyway, thanks for the suggestions, and hopefully this helps someone else. (Photoashes, let me know if you have any questions and maybe i'll have a thought or two...)
  • If you will look at the address bar in your browser you will see a number that should keep incrementing. These tools traverse the filesystem to make sure everything is "ok" but the browser/server would time out if they did not return a web page from time to time. So they keep track of where they are in the database and restart regularly. That number is the image ID they are on.
Sign In or Register to comment.