eZ Community » Forums » Developer » Container user
expandshrink

Container user

Container user

Sunday 11 March 2012 10:48:44 pm - 9 replies

Hello I am having the same problem as described in http://share.ez.no/forums/developer/container-users/%28language%29/eng-GB

I am not able to visualize children of user. Not even when i use contentobject.main_node_id as someone suggested in that link.

When i do attribute(show) i get this:

children   array   Array(0)
children_count   string   0

I want to add galleries, files, etc for each user. I already changed the class adding more fields & set it to container. Then by administration i did add some subitems for users which i am not able to output on site.

Should i not put user as container? Was thinking about changing idea to use object relation between a user & the user items (which can be located in content tab).

Regards

Monday 12 March 2012 9:18:42 am

Hey,

Which eZ version do you use?

Monday 12 March 2012 9:59:07 am

Are you sure it is not a permission problem? By default anon users can not see any content in the "user" section

Monday 12 March 2012 12:08:45 pm

Heloo Gaetano & David,

thanks a lot for your reply.

Gaetano i am using version 4.4.

David i am using admin user. I guess even if i used anonym user at least the attribute|show would let me know how many children are there, and it would give permission error too, like access denied. Nothing like this happened.

The problem still persists.

Regards

Friday 16 March 2012 2:19:59 am

Hello

Does anyone knows what's wrong?

I am still waiting for help/

Regards

Friday 16 March 2012 12:45:26 pm

Quote from Vali Faria :

Hello

Does anyone knows what's wrong?

I am still waiting for help/

Regards

Hi,

Can you check user right ? can anonymous see ('content/read') your "user" children?

because ChildrenCount of a node depends on each Child Node visibility. and as I know by default, IgnoreVisibilty in SubtreeCount and SubTree is set to false.

Modified on Friday 16 March 2012 12:46:32 pm by Ousmane KANTE

Friday 16 March 2012 2:43:41 pm

Hi Ousmane

I am able to see the child if i type the URL manually. I can see the user too yes. User children are visible to everyone if typed manually the URL. But when i do attribute|show() it counts as zero. 

Regards

Friday 16 March 2012 5:34:12 pm

Quote from Vali Faria :

Hi Ousmane

I am able to see the child if i type the URL manually. I can see the user too yes. User children are visible to everyone if typed manually the URL. But when i do attribute|show() it counts as zero. 

Regards

Hi,

Can you show us your template code Here please?

regards,

Friday 16 March 2012 9:19:39 pm

Hello,

sorry not to be clear.

The code is:          

                             {attribute_view_gui attribute=$userAccount.contentobject.data_map.image image_class='profile'}
                                            {$userAccount.contentobject.name|wash} ({$userAccount.login|wash})
                                        {"Username"}
                                        {$userAccount.login|wash}
                                        {"Email"}
                                        {$userAccount.email|wash(email)}

                                       {"Name"}{$userAccount.contentobject.name|wash}
                               
                                {$userAccount.contentobject|attribute(show)}

 

The output is:

Username admin<br/> 

Email  testSPAMFILTER@test.com<br/>

 Name Vali F<br/>

teste $userID=14(...)<br/><br/>

main_node object[eZContentObjectTreeNode] Object
>node_id string 15
>parent_node_id string 13
>main_node_id string 15
>is_hidden string 0
>object object[eZContentObject] Object
>subtree array Array(0)
>children array Array(0)

<br/>(...)<br/>

So, you see in the last line of output it shows 0 children, when the user got galleries in subtree. I dont undstand why it is counting as zero.

One more IMPORTANT thing that i only noticed now is this is happening only in ezteamroom. In normal site i can output the children, so its not 0 there.

Thanks

Modified on Friday 16 March 2012 11:57:51 pm by Vali Faria

Saturday 17 March 2012 9:59:59 am

Hello,

I found out myself. It was object translation problem, because ezteamroom's default language i did put UK english and for normal site, and those children were created only in american english that is why i couldnt output in ezteamroom. Now its solved.

Thank you Osmane, David and Gaetano.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from