Tags missing?

Hi everyone,

I recently updated my gallery to the latest version.

I've had a bit of trouble logging in as the admin but now that I'm in, I've noticed my tags are missing. It's a vital part of the gallery I maintain, because I have a lot of dynamic galleries. Is there a way I can import my tags structure from my previous version to the current version?

I've tried manually adding the tags in "Tag Management" as the same name as what was previous, but it doesn't force the *albums* which I have in my gallery to carry the same tag as previous. So what has happened is all of my albums do not have their existing tags (rather than images themselves).

I did a backup just before I upgraded.

I'm not even sure if this will fix my problem, but I'm taking it one step at a time at the moment.

Thanks for any help!

Comments

  • If things from the database are missing after an upgrade the usual cause is that somehow you have change either the database name or the table prefix while doing the upgrade.

    Check your database and see if there is now new table entries with a different prefix. If so, just change the prefix back in the zenphoto.cfg file in your zp_data folder.

    If your backup was done via Zenphoto restoring it should also fix the problem so long as you have not made too great a leap of Zenphoto versions.
  • Thanks for that sbillard,

    I can see via phpmyadmin that in all my tags are there in zp_tags.

    $conf['mysql_database'] = 'username_znp1'; in the config is the same in phpmyadmin = 'username_znp1'.

    If I make a new tag now from within zenphoto, it doesn't show up on zp_tags. Instead, it shows up within .tags

    I have this line within zenphoto.cfg. I assume I have to change that? to zp_?
    $conf['mysql_prefix'] = ".";

    EDIT:
    If I do that I get:

    Zenphoto has detected a change in your installation.

    Zenphoto 1.4.3.2[10732] has been copied over an unknown release.

    Please reinstall the following setup files from the 1.4.3.2 [10732] release:

    zp-core/setup.php
    zp-core/setup/setup-functions.php
    zp-core/setup/setup-option-defaults.php
    zp-core/setup/setup-primitive.php
    zp-core/setup/setup-sqlform.php
    zp-core/setup/setup.css
    zp-core/setup/setup_permissions_changer.php
    zp-core/setup/setup_set-mod_rewrite.php
    zp-core/setup/setup_themeOptions.php

    The change detected is critical. You must run setup for your site to function.
  • Yes, since the database prefix was wrong when you first installed, the tables with the correct prefix have not been updated--thus the need to run setup.
  • Ok thanks, ill see how I go.
  • All good. I have a separate issue which I'll post in a new thread.
  • The above isn't really relevent to my issue now, but the title of the thread is the same, so I thought I'd stick it in here.

    I've restored zenphoto's database back a couple of days and now a lot of my tags aren't assigned to my albums.

    All the tags which I've made are in admin-tags.php (which is good).

    However, for the albums themselves, they now just appear blank for, I'd say, 95% of the albums I've created.

    Is there something I need to check in phpmyadmin, table wise, which might align them back up? I can see the _tags table, and my tags are listed there. I tried to look at the documentation and couldn't really understand how the tags are associated with the albums. They don't look to be in the _albums table..?

    Any help would once again be appreciated.
  • From your description I would presume you used phpmysqladmin for your backup/restore. If you wish to do that you need to be sure your entire gallery is in EXACTLY the same state as it was when you made the backup. Then be sure that zenphoto is not running when you do the restore.

    For instance if album IDs have changed then the tags will not match up. There is an associative table that links tags to albums by these IDs.

    It is for this reason that the software provides you with a backup/restore facility.
  • I didn't use phpmyadmin for the backup/restore.

    What I did was:

    1. Upgrade to the latest.
    2. The host restored my zenphoto folder back a couple of days
    3. I reinstalled my old version
    4. I then still had a few errors which I had with the latest version, so I restored using zenphoto's overview button.

    And... here I am. I mean, I couldn't say that the gallery is in exactly the same state as what it was. It probably isn't.

    I'm not really sure what to do from this point. I'm running a database refresh and have refreshed the metadata. But, neither will work for what I want to happen, I wouldn't assume.

    I'm in trouble, aren't I?
  • acrylian Administrator, Developer
    If you are restoring the database the physical albums structure in the root /albums folder must be exactly the same. Otherwise the database will refresh based on the filesystem and possibly change things like tag relations.

    You would only get tags back to images if they were embedded into metadata itself. If you added them manually, there is no chance to restore. Unless you have a mirror of the old site.

    If your site is important for your (or your clients) business, always create a mirror (an exact backup version) either on a local server (WAMP, LAMP, MAMP) or on the live server. Try updates there first so in case things go wrong your actual site will not be harmed. You also can just fix all possible theme or plugin issues caused by upgrades. There are always things that can go wrong.

    Btw, from what version did you upgrade?
  • Ahh, I see. I don't believe the root album structure changed, but perhaps it did.

    The tags aren't embedded into the metadata of the images, but perhaps I should be doing that from this point forward.

    My installation is still fairly shakey, I think. What I'm going to do is re-create my theme using the Basic theme as a template almost like a fresh start and then keep a backup on a live server. I feel like the live server works better than a local server for things like this, but it could just be me.

    I'm quite far back:
    Zenphoto version 1.4.5.9 [12ad1f92fa] (Official build)
  • acrylian Administrator, Developer
    1.4.5.9 is not that far back actually. Actually just one minor/major version (with 1.4.7 we changed version numbering a bit).

    I can't exclude that something other might have gone wrong on your install. Actually I would recommend to use the database backup tool without compression as that seems to work most reliable to me personally.

    I have good experiences with my local MAMP server.
  • acrylian, any ideas if I could potentially restore the database and the zenphoto folder back, say, 5 days (when I had no issues) whether or not that would help or hinder the tag situation (and the situation as a whole)? It would all be done through the host of the server, no ZP involved.

    If all it means is that I have to re-upload 5 days worth of images, I'll take that, but I'm unsure if it's going to help the situation?
  • acrylian Administrator, Developer
    No other idea than what we have on our install page. Make sure the site's albums folder has the physical structure of the database backup. If the albums folder changed Zenphoto will match up the database to that right after you used the database backup.
Sign In or Register to comment.