This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Developer » Container users??

Container users??

Container users??

Sunday 17 June 2007 4:09:56 pm - 5 replies


I modified user class to be container. Then created a new content class which will live under the user. Then i created content with no problems.

The problem starts when i try to recover that nodes under the user. Using code like

{def $usuario=fetch('user','current_user')}
{def $nodes_list=fetch('content','list',hash('parent_node_id', $usuario.contentobject.main_node_id))}

doesn´t work. Returns an empty array. But if i manually fetch one of the nodes under $usuario with something like

{def $nodes_list=fetch('content','list',hash('parent_node_id', 113))}

It returns the node with no problems.

Also tried the code from the admin siteacces (copy / paste) with the same results.

Is this a bug? Is there any way to fetch all nodes under a user??


Sunday 17 June 2007 10:26:18 pm

what is $usuario.contentobject.main_node_id if you output it ?

Monday 18 June 2007 9:15:15 am


$usuario.contentobject.main_node_id is the actual user node_id. I fetched user in the line before :

{def $usuario=fetch('user','current_user')}

Because $usuario.node_id is not definided and the only thing i found with the same value was $usuario.contentobject.main_node_id.



Monday 18 June 2007 6:22:18 pm


I'm stuck about this. Any idea about how to fetch content under the user? is this a bug? a feature?

Any help would be appreciated

Luis Muñoz

Tuesday 19 June 2007 5:03:01 am

Your $usario variable contains a User object, which is a different from the user's content object.

$usario.contentobject.main_node_id is the correct variable to call for the main_node_id.

If this fetch isn't returning anything, there are a couple of things to check:

* Check the anonymous role (or whatever role you're using) to ensure that you can read the content objects

* Check the role assignment to ensure that it's not limited to say, media and content.

Tuesday 19 June 2007 8:55:01 am

It is also good idea to enable debug output with SQL output, you can see what is wrong there.


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

36 542 Users on board!

Forums menu

Proudly Developed with from