Forums / Developer / Debug page
Coulibaly Ibrahim
Tuesday 29 August 2006 7:04:20 am
I've this code under in n/node/view/full.tpl overrides
{section show=count($node.object.can_create_class_list)} <center><form method="post" action={"/content/action"|ezurl}> <input type="hidden" name="NodeID" value="{$node.node_id}" /> <select name="ClassID"> {section var=class loop=$node.object.can_create_class_list} <option value="{$class.id}">{$class.name|wash}</option> {/section} </select> <input type="submit" name="NewButton" value="{'Create here'|i18n('design/standard/node/view')}" /> </form></center> <br /> {/section}
and i obtain this warnings in my debug :<i>Undefined index: classes in /var/www/html/projet7/kernel/classes/ezcontentobject.php on line 3638
Undefined index: language_codes in /var/www/html/projet7/kernel/classes/ezcontentobject.php on line 3639 Invalid argument supplied for foreach() in /var/www/html/projet7/kernel/classes/ezcontentobject.php on line 3647array_diff(): Argument #1 is not an array in /var/www/html/projet7/kernel/classes/ezcontentobject.php on line 3658</i>
Does someone knows where these warnings come from? I've predefined a role that will be limited to sections.i'me testing it. and i receive this warning.
the code comes from here:http://ez.no/products/ez_publish/documentation/customization/tips_tricks/editing_creating_and_removing_content_from_the_user_page
thanks .
Marcin Drozd
Tuesday 29 August 2006 7:27:20 am
HiWhich version of Exponential do you use? 3.8 or earlier?
if 3.8 try to add: <input type="hidden" name="ContentLanguageCode" value="lang-code" />where lang-code U can use ezini() to get language settings.
http://ez-publish.pl
Tuesday 29 August 2006 9:15:35 am
Thanks, Marcin i'm using eZP 3.8 and php 4.4.2but i tested, and steel remaining the same errors.
my EzP Regional setings is :
[RegionalSettings] Locale=fre-FR ContentObjectLocale=fre-FR TextTranslation=enabled SiteLanguageList[]=fre-FR ShowUntranslatedObjects=enable
is it correct?i'm using only one language: french-->fre-FR
Claudia Kosny
Wednesday 30 August 2006 12:27:04 pm
Hello Coulibaly Ibrahim
There seems to be a problem with the roles of the current user. So could you please post the permissions the user/role has? Has your user permission to create something under the node that you are viewing?Does the same happen if you remove the section limitation?
Greetings from Luxembourg
Claudia
Wednesday 30 August 2006 12:52:39 pm
Hi Claudia and thanks:exple af Policy:
content create Class( Actualité , Evenement ) , ParentClass( Dossier actualité )
butyes the same problem appears when there's no limitaition
I thought it comes from Languages problem.because -->Languages code is not define. perhap i must set Rôle defining language??
Thursday 31 August 2006 12:40:13 am
Hi Do U have: content <b>edit</b> Class( Actualité , Evenement ) , Owner( Self )??
Friday 01 September 2006 4:31:55 pm
Unfortunately I don't know what is going on - I have tried a similar role and did not get any errors. Somehow EZ can't fetch the policies array properly. I don't think is has to do with the languages - the error message just mentions the languages because at a certain point during the retrieval of the information on cancreateclasslist EZ tries to fetch the policies into an array with the keys 'classes' and 'language_codes'. As the whole thing fails the language codes are mentioned as well.
Maybe the user or the user group you assigned the role to has become invalid somehow - I really do not know - sorry.