Upgrade to 1.1.5 problems

Last night I upgraded to 1.1.5 and now I am experiencing several issues. First, when I log in to the admin account I am immediately presented with an error. I suspect the upgrade process modified my tables somehow and now I am getting this error:

Zenphoto Error
MySQL Query ( SELECT `id`, `name`, `website`, `type`, `imageid`, (date + 0) AS date, comment, email, inmoderation FROM `zp_comments` ORDER BY id DESC LIMIT 10 ) Failed. Error: Unknown column 'imageid' in 'field list'

Second, while my photo albums appear in the albums list, when I click on an album I get a error message stating the page does not exist or that the URL is incorrect. It worked fine before the upgrade so I can only suspect that this has somehow also been modified.

Finally, and this is a little thing, the version info is no longer displayed at the bottom of the admin screen. Maybe just an oversight for this version.

If anyone can offer assistance, I will greatly appreciate it.

Thanks

P.S. I think that an excellent addition to the ZP features would be an auto installation and upgrade script.

Comments

  • Are you running a custom theme? Have you got any custom PHP code? THe `imageid` field was renamed on version 1.1.5. So, it would seem that somewere there is code that has not got changed. Either there is custom code that is doing this or one (or more) of the zenphoto core files did not get updated to the 1.1.5 level.

    We have considered the installation script. However, there would need to be multiple scripts for the different servers, etc. Is it really so bad to upload the zenphoto files?
  • Thank you for the info. I am not running a custom theme. I uploaded the upgrade again and this time it appears to be working. Perhaps a file did not upload properly the first time. One issue I have noticed is the Theme Options Tab in the Admin section does not work. The theme I am using (Effervescence) states that some options can be changed through this tab. When this tab is selected the tab gets a black bar, but the screen remains as the previous tab.

    Regarding the installation script. I can understand not wanting to tackle it. Indeed it is easy to upload files, however, the objective is not to "upload files" but to successfully upgrade ZP. I find the Upgrade Instructions rather inadequate. Here are the Upgrade instructions from the ZP site:

    Upgrading
    With anything after ZenPhoto 1.1.3, upgrading is super easy!

    1. Backup your MySQL database.
    2. Remove the “zen” or “zp-core” folder and the files in the home dir within your installation taking note of the database credentials in your zp-config file, you will need it in step 4
    3. Download the latest version and upload it to your server.
    4. Once the files are uploaded, go to www.yoursite.org/gallery/. Setup.php will run. Follow the instructions.
    5. You’re done! Enjoy.

    Here is my response:

    1. Why backup the database? Is it for safety reasons if something goes wrong? If you want someone to do something, tell them why. (It seems to me backing-up the current ZP installation prior to upgrading would also be a good precaution.)

    2. Again, why? Step 4 does not ask me to do anything with the “zen” or “zp-core” or the zp-config file. You will have to re-enter the database config info again, if this is what the instructions refer to.

    3. Am I to completely overwrite the current files? What happens to my albums? The upgrade album directory is empty. My current album directory has all the photo images for the albums. If I overwrite, will I loose all my images and have to rebuild the entire thing? I backed up my album directory before hand just in case. It's a good thing I did. I am told in step 1 to back up the database and in step 2 to remove the "zen” or “zp-core” or the zp-config file, but nowhere is the album directory mentioned. What about themes? If I have added a theme that is not in the standard distribution, won't I loose it if it is overwritten by the upgrade? Shouldn't this be backed up also?

    4. Yes, this is correct, if you don't get any errors. What about those files referred to in step 2?

    5. Well. . .

    These questions or issues are not unreasonable and they are relatively easy to anticipate. The issue is not the ease with which one can upload files, but the difficulty with upgrading software successfully when the instructions are not clear. If you are going to ask people to perform actions that are not necessarily intuitive (and I don't mean to the programmer), then you need to provide them with adequate information to complete the task successfully.

    I like ZP very much. It is reliable and relatively easy to use. As for it being "a simpler web photo gallery," better upgrade instructions would certainly help ensure so and free you from having to answer upgrade issues from users like me.
  • 1. It is for safety purposes. Perhaps you are cautious, but many of our users need reminders.

    2. Step 2 is there to prevent the problem you had in the first place. Also probably the problem with the tabs.

    3. If you followed step 2 you won't have any files to override in those folders. There are no album files in the release distribution, so nothing will be overridden. Nothing told you to remove your album folder. The reason the album folder is not mentioned is that you have nothing to do for it. Don't do something not requested. The themes distributed with zenphoto will be overridden. You are not asked to remove the themes folder since you may have more thems there. Again, don't remove anything you are not asked to remove. All you were asked to remove was the folder `zen` and/or `zp-core`.

    4. Your point is?

    5. See #4

    As with any endevor, please try not to read in to the instructions more than were written.
  • "2. Step 2 is there to prevent the problem you had in the first place. Also probably the problem with the tabs."

    I did follow step two, and experienced those problems. So obviously, problems can still occur. The tabs issue still exists.

    "3. If you followed step 2 you won't have any files to override in those folders. There are no album files in the release distribution, so nothing will be overridden. Nothing told you to remove your album folder. The reason the album folder is not mentioned is that you have nothing to do for it. Don't do something not requested. The themes distributed with zenphoto will be overridden. You are not asked to remove the themes folder since you may have more thems there. Again, don't remove anything you are not asked to remove. All you were asked to remove was the folder zen and/or zp-core."

    Yes, there is an album directory in the 1.1.5 distribution. Go to the ZP site and download it. When you unzip, there is a directory called "albums". If you upload all files then you will overwrite any files/directories that have the same name unless you take precautions not to. Since you do not instruct us to remove the album folder or back it up, all data in that folder will be overwritten. Same applies to themes. If I had not done something you did not request, then I would have been required to completely upload and rebuild my photos albums and themes.

    "4. Your point is?"
    "5. See #4"

    The point is you refer people to actions that you later do not include. The instructions are not congruent. When you do this it gives the impression that you have forgotten something. When that happens it creates doubt. Is it that hard to understand?

    "As with any endevor, please try not to read in to the instructions more than were written."

    As with any endeavor, listening to customers input and taking it seriously can provide valuable insight regarding your product. Did you actually investigate my comments or merely respond off the cuff? Don't be too dismissive. I have been a technical writer and help systems designer for 15 years and, although you may not like my comments, you would do well to heed them.
  • acrylian Administrator, Developer
    Please, no need to feel offended here, we do listen to our users. As a technical writer you should know that developers take often things for granted and forget that others don't do. But it sounds like computer basics to me that you should not overwrite folders you uploaded important data to...:-))

    Anyway, to defend sbillards intention he simply thought these folders were not in the package, since they actually should not be. They should be created by setup during the install if not already existing. You are indeed right that they are in the 1.1.5 package, so that's our fault (or more exactly probably that of the automatic script that generates the package from svn.). Sorry about the confusion.
  • It seems to me that you understand the issue. Thanks!

    Can you offer any assistance regarding the Theme Options Tab not working properly? I have updated the software twice and still get the problem. I switched between themes with no luck. Could it be a browser issue?
  • acrylian Administrator, Developer
    I doubt that it's a browser issues. Are theme files really complete? There must be a file named theme-options.php within every theme folder.
  • There is a file named "themeoptions.php" (no dash) in each theme folder. These are the themes that came in the upgrade. I have made no modifications.
  • acrylian Administrator, Developer
    Sorry, yes, without dash. I just did a quick forum search, could you please read here if anything maybe applies to your situation? http://www.zenphoto.org/support/topic.php?id=2058&replies=15#post-12109
  • I looked at this post once before. The theme css files are in the styles folder, so I don't think the css files for the options are missing.

    I know next to nothing about php, so I have no idea how to implement these patches. I did find the glob function in three of the php files: admin-functions, functions, and class-album. I inserted the the patch in the admin-functions file but it either didn't do anything and caused a blank page in the admin section. It just seems odd that all the other tabs function properly.

    I'll check to see if my host service allows the glob function.
  • The `SAFE_GLOB` is releated to drop-down boxes not being populated. The option tabs are controled by javascript. If you are missing one of the js files this could cause the problem.

    BTW, I know that the folders are in the distsribution. But of course, I also know that they are empty so cannot overwrite anything.
  • I am having problems with the admin theme option tab. After comparing all the files I have installed with the files in the 1.1.5 download, I can confirm that all the js files are there. I thought maybe one could be corrupted so I uploaded them again with no luck. I have tried several browsers with no change.
  • acrylian Administrator, Developer
    BTW, I know that the folders are in the distsribution. But of course, I also know that they are empty so cannot overwrite anything.
    Sbillard, that is likely to cause missunderstandings. If our instruction says copy all content of the package to the folder, it will likely overwrite the albums folder that is already existing... Of course it should be logical not to do that if you have images, but we maybe should really point that out more clearly (or just let setup generate those folders).

    ming21: I wish I would have any other idea except than making a real clean install, meaning deleting everything from files to db tables...

    sbillard, not being a server expert, could this maybe be related anyhow to safe mode? (helpless guess)
  • No, when you copy an empty folder it overrides nothing. All that it will do is create the folder if it does not already exist, which is why they are in the package.
  • I tried a clean install, without deleting the db tables, and it did not work. After I diid that I received a reply from my host service and upon looking at the php.ini I found the following related to the glob function:

    - register_globals = Off [Security, Performance]
    ; Global variables are no longer registered for input data (POST, GET, cookies,
    ; environment and other server variables). Instead of using $foo, you must use
    ; you can use $_REQUEST["foo"] (includes any variable that arrives through the
    ; request, namely, POST, GET and cookie variables), or use one of the specific
    ; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending
    ; on where the input originates. Also, you can look at the
    ; import_request_variables() function.
    ; Note that register_globals is going to be depracated (i.e., turned off by
    ; default) in the next version of PHP, because it often leads to security bugs.
    ; Read http://php.net/manual/en/security.registerglobals.php for further
    ; information.

    It appears that they have disabled the glob_function. I suppose I can enable it by changing the "OFF" to "ON"? If so, this brings up the security issues they are referring to. I can use PHP 5, however, I do not know if this will have any effect on other applications I use that require php. What do you advise?
  • The "security" problems are both overstated and under protected. You can either enable the glob function or if you prefer, you can modify zenphoto to not use it. See http://www.zenphoto.org/2007/12/troubleshooting-zenphoto/#14
  • I tried both suggestions and neither worked. I then decided to wipe everything, including the db as acrylian suggested, and reinstall ZP (1.1.5 [1219]). That worked. So without knowing more, it appears the db tables were the sticking point.

    One thing I did loose were the descriptions and comments for the photos. Can you tell me what file(s) this data is stored in? I have a backup of the data and, if you don't think it will create any problems, I hope I can install these backup files and get the data back without having to manually input it again.

    Thanks for your help with this. Sorry it took so long to figure out.
  • The information is stored in the "albums" and "images" database tables. These may not be the exact names since you might have prefixed them with something such as "zp_".
Sign In or Register to comment.