Upgrade issues

Hi,

I just upgraded ZP from 1.0.8 to 1.1.3 following the instructions provided in the documentation.

Here is a summary of the issues I had :
1) During upgrade :
About to update tables...
Cleaning up...

Warning: rmdir(/mnt/web3/31/21/51569621/htdocs/photos/cache/abbaye-de-valmagne) [function.rmdir]: File exists in /mnt/web3/31/21/51569621/htdocs/photos/zp-core/class-gallery.php on line 438

Warning: rmdir(/mnt/web3/31/21/51569621/htdocs/photos/cache/30-ans-besse) [function.rmdir]: File exists in /mnt/web3/31/21/51569621/htdocs/photos/zp-core/class-gallery.php on line 438

Warning: rmdir(/mnt/web3/31/21/51569621/htdocs/photos/cache/chateau-de-cassan) [function.rmdir]: File exists in /mnt/web3/31/21/51569621/htdocs/photos/zp-core/class-gallery.php on line 438

Warning: rmdir(/mnt/web3/31/21/51569621/htdocs/photos/cache/au-petit-boulanger) [function.rmdir]: File exists in /mnt/web3/31/21/51569621/htdocs/photos/zp-core/class-gallery.php on line 438
I'm not sure that this is a real problem since images display correctly.

2) After upgrading :
-The accented characters are replaced by something else (example : "Palais Idéal du Facteur Cheval") everywhere (title, comments, description).
-I noticed some javascript errors under IE6 (differents errors in Admin section and in Gallery). They don't have any impact though.
-Parameters defined previously in zp-config.php are lost (web site title, number of images per page ...). Not really a problem but worth to know before upgrading.
-Cannot open the "Image info" link : nothing happens, no error. Maybe something with IE6 again ? Is it because I did not refreshed the EXIF info ?
-Album and image sort orders are lost and seem to be sorted randomly. This is where I wonder if the upgrade has really succeeded.

Could you plase tell me if there is a problem with the upgrade process or if I did something wrong ?

Thanks in advance.

Comments

  • #1. This is probably an issue with non-image files in the cache folders. Not sure where they would have come from, but you can manually delete the cache files and folders to get things cleaned up.

    #2.
    -Others have reported the accent character issue. It is under investigation.
    -The JS errors seem to be an IE issue with the ajax scripts. They do not seem to be causing any real problems.
    -The old zp-config parameters should have been carried over if you copied your old zp-config.php file to the new installation. Anyway, it is too late to do anything about that now.
    -"Image info" works on IE7 and FireFox, so it is probably an IE6 issue.
    -Don't know why the sort order would have been lost except if it had not really been set in the first place. Anyway, there are lots of new sorting options, so you can easilyl get the order you want.

    I do not think you did anything wrong.
  • acrylian Administrator, Developer
    sbillard: The JS errors are in Firefox, too. Without having any effect.
  • Hi,

    Related to the accent character issue, I just modified 3 php files (classes.php, class-album.php, class-image.php) as a workaround. I modified less than 10 lines of code so that the UTF-8 characters stored in database are displayed correctly and then I added a conversion to UTF-8 for any update.
    My code is not a fix but a workaround for the ones (like me) who cannot wait the 1.2 version.

    I can share the changes if any of you is interested.
  • We would be interested in seeing your changes. Perhaps they can be incorporated prior to the I18n implementations.
  • Here are the changes I made based on 1.1.3 version :

    **class-image.php

    179c179
    < function getAlbumName() { return $this->album->name; }
    ---
    > function getAlbumName() { return utf8_decode($this->album->name); }
    182c182
    < function getTitle() { return $this->get('title'); }
    ---
    > function getTitle() { return utf8_decode($this->get('title')); }
    186c186
    < function getDesc() { return $this->get('desc'); }
    ---
    > function getDesc() { return utf8_decode($this->get('desc')); }

    **class-album.php

    122c122
    < function getTitle() { return $this->get('title'); }
    ---
    > function getTitle() { return utf8_decode($this->get('title')); }
    126c126
    < function getDesc() { return $this->get('desc'); }
    ---
    > function getDesc() { return utf8_decode($this->get('desc')); }

    **classes.php

    242c242
    < $sql .= "'" . mysql_escape_string($value) . "'";
    ---
    > $sql .= "'" . utf8_encode(mysql_escape_string($value)) . "'";
    261c261
    < $sql .= " `$col` = '". mysql_escape_string($value) . "'";
    ---
    > $sql .= " `$col` = '". utf8_encode(mysql_escape_string($value)) . "'";

    I have no idea if it is coded correctly or not.
    I checked that the display of albums and images are OK for accented characters.
    I also checked that the update of album title/desc and image title/desc.
    I did not check if the creation of an album works or not with accented characters.
  • mav Member
    benchi,

    Thanks for posting your solution. I've tried using it and zenphoto still nukes anything that's not latin1 - all I can see in a gallery that used to have a lot of cyrillic desc and comments are ?????.

    Anybody else has an idea on how to work around 1.1.3 bugginess?
  • mav Member
    I also noticed that if I load the comments back from a database backup I can see them just fine in the phpmyadmin, but the moment zenphoto cleanup is run all non latin1 comments are removed from the comments table.
  • acrylian Administrator, Developer
    Mav: Please try the nightly build.
  • mav Member
    acrylian:

    Downloading now... Thanks for looking into this. I'll report back asap.
  • mav Member
    acrylian. still not working. Everything in the mysql database I'm using on my webhost is utf8_general_ci. I can read all entries just fine with phpmyadmin. However, everything is just ???? in zenphoto. My friend's gallery that I've botched while upgrading from 1.1.2 to 1.1.3 is http://photo.hopeart.info user:password are test:test if you want to take a look.
  • acrylian Administrator, Developer
    That clearly should not look like that.... Does it work if you fill in a new description and save it? How does that look like in the db? Did you try changing the encoding in the admin?
    sbillard may know more about that since he already worked on the problem.
  • Looks like only some of the entries are wrong. What are the differences between the ones that show correctly and the ones that do not?
  • mav Member
    sbillard:

    I added a couple of the descriptions recently and the newly added ones show up in the zenphoto, but in the database they are garbled like Белка то что надо. Those that I can read in the phpmyadmin look like ??????? in zenphoto. All charsets and collations are utf8_general_ci in the database and tables.
  • I wonder if using the utf8_decode php function on cyrillic text is a good idea : the cyrillic text seems to be converted in ????.
    The workaround may be applicable only if the original text is encoded in UTF8 or latin1. The php doc reads : "utf8_decode — Converts a string with ISO-8859-1 characters encoded with UTF-8 to single-byte ISO-8859-1".

    The fact phpmyadmin shows newly added comments as Белка то что надо is normal since everything is encoded in UTF8 in database with the workaround. Your phpmyadmin is certainly configured for displaying eastern european languages, that's why you can read old comments but not UTF8 encoded ones. You can override that in Firefox by changing the Character encoding option (menu View).

    Back to your initial problem, I don't know if you had better converting everything in database to UTF8 (and using the workaound) or using other php function for cyrillic languages instead of utf8_decode/encode (if they exist).
  • mav Member
    benchi,

    I've already done the conversions using queries like this
    ALTER TABLE `albums` CHANGE `desc` `desc` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
  • Just to be sure : do these queries actually convert data to a new character set or just change the character set of the columns ?

    Second question : were the old comments consistent with the initial character set of the columns or not ? As far as I know, MySQL does not prevent you from encoding and storing text in latin1 even if the column character set is UTF8.
  • to fix my UTF-8 character issue i added

    ``

    to the header of image.php, album.php, index.php, search.php etc.. etc..

    hope this helps.. tho don't think it will fix the database storing issue you mentioned you had, if you still have it.. but it will help the browser display the characters properly :]
  • I have the same issue as Benchi: after upgrading to 1.4, all "special characters" (French accents, Chinese and Korean) became garbled in Zenphoto, but look still perfect in database (Phpmyadmin). I had to manually correct all of them in Zenphoto, and now it's the database that looks garbled...
    Database, tables, Zenphoto and Webpages are all set to work in Utf-8.

    By the way I have Texpattern (Utf-8) on the same site/database and it works all right: French and CJK look all right everywhere, website and database.

    So, I really don't know what the problem is...

    Thanks to anyone who could help. Otherwise, I'll just have to stick to 1.4 forever. ;-)
  • same problem as zoolive when i upgrade froท 1.1.3 > 1.1.4 all Thai characters > garbled
    but when i open it in database(phpmyadmin) > all characters display correctly

    now, every time i load Zenphoto page , I have to chage "characters encoding" from utf8 to Windows(Thai) everytime

    how to fix this problem ?
  • Do you mean that the option in ADMIN for the character set is not sticking?
  • trisweb Administrator
    I believe he means he has to tell his browser to use a different character encoding.
  • I don't know for Artz, but for me everything was set to work in utf-8 from the begining.
    And it worked all right till I upgraded to 1.4
    I didn't change anything during the upgrade, so something must has gone wrong when upgrading database's tables. But what? That is the question.
Sign In or Register to comment.