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 :
Quote: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.
Could you plase tell me if there is a problem with the upgrade process or if I did something wrong ?
Thanks in advance.
-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.
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.
Here are the changes I made based on 1.1.3 version :
**class-image.php
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
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
$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.
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?
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.
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.
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).
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 ?