Hi.
While creating categories and saving I get this message :
`
Notice: unserialize() [function.unserialize]: Error at offset 5 of 78 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
`
I use ZP nightly version 3048.
Comments
when I come back to the zenpage admin panel in the articles sections I get this :
`Strict Standards: Only variables should be passed by reference in /home/user/zenphoto/zp-core/plugins/zenpage/zenpage-admin-functions.php on line 1186`
then when I click on "modify this article", the permalink isn't displayed
then if I click on "see the article" I get an error :
Zenphoto Error
MySQL Query ( SELECT COUNT(*) FROM `zp_comments` WHERE `type`='news' AND `inmoderation`=0 AND `private`=0 AND `ownerid`= ) failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
I use Zenphoto in a multilingual way, with url rewriting on.
My PHP Version is 5.2.1
Mysql is 4.1.22
If you have any idea...
I will try to find out what could cause the first two notices you reported (although I did not see them myself yet at all).
Regarding the Zenphoto error with MySQL: I got that once very suddenly and was not able to reproduce since then. I also never encountered not being able to select categories neither on my local MAMP nor on my site. But I think there was an report before so there is probably something. Also the permalink display never dissapeared...
I will try to find out though.
I've upgraded to the last zenphoto nightly [3055] and to zenpage trunk r3056.
1. I still can't select a category for an article, it isn't stored, so a new article is counted in every category but you can reach it only through the "all news" category.
2. the permalink doesn't appear automaticaly even if "permalink on" is activated
3. While saving I get these errors :
`
Notice: unserialize() [function.unserialize]: Error at offset 5 of 112 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
Notice: unserialize() [function.unserialize]: Error at offset 5 of 112 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
`
2. First let me explain the permalink checkbox. That is only so that the titlelink does not change if you edit the title of your page/article. If permalink is not checked the titlelink would reflect every change made to the title.
If the titlelink is empty it will stay empty. You need to check "edit titlelink" and copy your titlte to the titlelink field in that case to get one.
There is a problem with not latin/european characters like Cyrillic or Chinese that the function to create the seo friendly link clears totally out. I don't know how to make these chars seofriendly since the function does not understand those chars and neither do I. But since you are French that should actually work.... Anyway, I will add a note for that to the "create" page and also a field for the titlelink to enter manually from the beginning optionally.
I hope that explanation makes sense to you...
3. I still don't see these notice and warning anywhere...
1. Yes I know, but don't you have any idea about what could be involved in this issue ?
This is the second time I get this problem on two websites using ZP.
Did you try that with multilingual mode activated ?
More : when I create an article, the categories checkboxes have this message just above :
`Notice: Undefined variable: selected in /home/user/zenphoto/zp-core/plugins/zenpage/zenpage-admin-functions.php on line 533`
Anyway, when I save the new article I get these messages :
`
Notice: unserialize() [function.unserialize]: Error at offset 5 of 112 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
Notice: unserialize() [function.unserialize]: Error at offset 5 of 112 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
`
and the page reloads with a blank fieldset, even if the article is stored in the db.
2.Fine, but if I don't fill the permalink field (which is the default way Zenpage works, isn't it ?) I can't get an URL for my article and clicking "see article" in the admin gives me an error :
`
Zenphoto Error
MySQL Query ( SELECT COUNT(*) FROM
zp_comments
WHEREtype
='news' ANDinmoderation
=0 ANDprivate
=0 ANDownerid
= ) failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1`
I use zenphoto version 1.2.2 [3055] | zenpage version 1.0.1 r3056
My PHP Version is 5.2.1
Mysql is 4.1.22
I've just noticed something :
when I create a new category without using the multilingual mode but keeping only one language for its title I have no error message while saving and I can select this category for one of my article and it is stored and working fine even if I still get that :
`
Notice: unserialize() [function.unserialize]: Error at offset 5 of 112 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
Notice: unserialize() [function.unserialize]: Error at offset 5 of 112 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
`
As you must have noticed, I'm not an expert at all but as far as I know, it seems that there is an issue with Zenpage and multilingual mode...
the page reloads with a blank fieldset, even if the article is stored in the db.
Yes, that is actually the coded behaviour. I made it that way because you can so easily add several pages/articles after another without having to click anywhere else. I thought that is a good idea since I sometimes want to do that... But probably I will change that behaviour in the next version so that you are taken to the edit page instead and have a button for "new page" there, too.
But I can't reproduce the category issue yet.
http://www.zenphoto.org/support/topic.php?id=4192
Anyway, I'll try to be clearer.
I've just installed zenphoto version 1.2.2 [3077] and zenpage version 1.0.1 [3077] and have done some tests.
For my tests, I removed from the "locale" directory every languages but the english and french ones.
----------
CATEGORIES
1. If I create a new category (named 'not multilingual category') WITHOUT USING the multilingual field I get this message :
Notice: unserialize() [function.unserialize]: Error at offset 0 of 25 bytes in /home/user/zenphoto/zp-core/plugins/zenpage/zenpage-admin-functions.php on line 805
IT DOESN'T WORK : the category is stored in the db but will catch every news even the ones which don't belong to it. Besides, when you click on 'not multilingual category' on the public website, it is just a link to www.website.com/news/category/ which displays no news at all.
2. If I create a new category (named 'multilingual category' and 'catégorie multilingue') USING the multilingual field I get this message :
Notice: unserialize() [function.unserialize]: Error at offset 5 of 97 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
literature.
and that briefly appears on a green background :
Category a:2:{s:5:"fr_FR";s:22:"catégorie multilingue";s:5:"en_US";s:21:"multilingual category";} added
BUT IT WORKS FINE
----------
ARTICLES
3. if I create a new article (named 'not multilingual article', content : 'not multilingual article') WITHOUT USING the multilingual fields and save, I get this message :
Notice: unserialize() [function.unserialize]: Error at offset 0 of 24 bytes in /home/user/zenphoto/zp-core/plugins/zenpage/zenpage-admin-functions.php on line 382
IT DOESN'T WORK : the article is saved but no titlelink for the url
4. if I create a new article (named 'multilingual article' and 'article multilingue' with the same contents) USING the multilingual fields and save, I get this message :
Notice: unserialize() [function.unserialize]: Error at offset 5 of 93 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
BUT IT WORKS FINE
----------
ARTICLES AND CATEGORIES
5. if I set that the 'multilingual article' belongs to the 'multilingual category' I get theses messages :
Notice: unserialize() [function.unserialize]: Error at offset 5 of 93 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
BUT EVERYTHING WORKS FINE
6. if I set that the 'multilingual article' belongs to the 'not multilingual category' I get these messages :
Notice: unserialize() [function.unserialize]: Error at offset 5 of 93 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
IT DOESN'T WORK : the category checkbox isn't check, the category titlelink links to www.website.com/news/category/ which displays no news at all.
7. if I set that the 'not multilingual article' belongs to the 'not multilingual category' I have no error messages displayed but IT DOESN'T WORK : the category checkbox isn't check, the category titlelink links to www.website.com/news/category/ which displays no news at all.
8. if I set that the 'not multilingual article' belongs to the 'multilingual category' I have no error messages displayed and IT WORKS FINE : the category checkbox is checked.
-------
Oh my god, this text must be an headache to read.
Anyway, that is a school book example of a report, even if it indeed causes headache...:-) But the headache is actually because I did not encounter any of the issues, especially after the titlelink fix I spend the half weekend on. The only issues I saw were the two referring to functions-l18n.php that you mentioned, too.
I actually believe that sbillard fixed the unserialize error in the zenpage-admin-functions but maybe that is another one.
I have the suspicion that some of your errors with the categories might be related to mixing mutlilingual ones and non multlingual ones since non multilingual titles are stored as pure text where multilingual ones are stored as serialized string. But actually the titlelink/catlink and the id are used for reference and not the title...
Maybe that is a bug in Zenpage or maybe it is one in the l18n functions or a combination... I have no idea yet.
I will try to do what you did and maybe I can reproduce anything.... I'll let you know.
I forgot to mention one small thing which isn't about Zenpage :
This upgrade (to zenphoto 1.2.2 [3077]) displayed a warning on the upgrade page about the flvplayer.swf (if I remember exactly) which is not in the .zip (anymore ?).
Acrylian will have to review what I have done.
I've just upgraded to zenphoto version 1.2.2 [3097] | zenpage version 1.0.1 [3097]
First, I don't have any errors while editing new categories but I still get these messages when I create a new article :
Notice: unserialize() [function.unserialize]: Error at offset 5 of 76 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
Besides, if I select a category for this article, it isn't stored : I must save (and get the messages above) then come back to article and then re-select the category to make it works.
I am really sorry I still can't reproduce the issue with the categories.
Update: A fix for the two errors is in the Zenpage svn now. Please check (you need also to update Zenphoto because of some other changes in other places)
it doesn't work at all :
when saving a new article I still get these messages :
Notice: unserialize() [function.unserialize]: Error at offset 5 of 86 bytes in /home/user/zenphoto/zp-core/functions-i18n.php on line 389
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/zenphoto/zp-core/functions-i18n.php on line 401
Besides I get this, even if I'm sure there are no other article with the same title :
An article with the title/titlelink already exists!
so the article isn't stored at all.
Regarding hte title/titlelink warning. Keep in mind that title and titlelink are independed if you have permalink enabled. So you your article can be named "article1" but the titlelink is "article2" theoretically. This warning of course also appears if the titlelink is not generated somehow.
I am sure you did already elsewhere but could you please again post your setup details?
I know that stuff about the title/titlelink, but after testing, I just can't create an article : it isn't stored.
Here are my Settings :
PHP Version 5.2.1
Mysql 4.1.22
zenphoto version 1.2.2 [3112]
zenpage version 1.0.1 [3112]
Plugins activated :
admin_toolbox v1.0.0
dynamic-locale v1.0.0 - All the langages are installed
flowplayer v1.0.3
image_album_statistics v1.0.6
paged_thumbs_nav v1.0.2
print_album_menu v1.4.6
slideshow v1.0.6.4
zenpage v1.0.1
Do you need something else ?
Here you must have noticed that this is exactly the same version as above but I've upgraded today with the last svn of Zenpage. I just don't know why this appears to be the same version...
Anyway everything I tested (new categories, new article) WORKS FINE, I have no error messages at all.
The only "issue" I still get is that I can't select directly a category while I'm creating a new article : this choice isn't stored. So I must write my article, check "published" and save it then come back to the main article section then select the article then re-check the category it belongs to then save again and it works. Do you have any idea of the cause of this behaviour ?
Anyway, even if this is not exactly "perfect" yet for me, now I can work with it.
Thank you all.
The current svn number of Zenpage should be 3127. but that number is a little missleading anyway. This is because the Zenpage svn is actually a sub repository of the Zenphoto svn.