eZ Community » Forums » Developer » Fetching a located (using locations)...

Fetching a located (using locations) content doesn't work

Fetching a located (using locations) content doesn't work

Thursday 11 December 2014 2:28:47 pm - 4 replies

Hi all,


I've a problem to get a content which appears in a node. This content has been put there by using "Locations". I try to get it using :

{def $contacts=fetch('content','list',hash('parent_node_id',$node.node_id,   'class_filter_type',  'include',   'class_filter_array', array( 'fiche_contact' )))}

When I simply copy this content in the node where I'm doing my fetch, it works, but when I put it in another node and use locations to put it in the node I'm doing my fetch, it does not work. Am I missing something? 

Thursday 11 December 2014 11:46:40 pm


I'm having a hard time understanding your description of the problem or your process at testing. Can you clarify in greater written detail?

If you want to fetch content from a different 'location' (as all locations have different node_ids and parent node ids) then you must use a different parent_node_id.

Perhaps if you explain in a bit more detail we can provide better direction.


Friday 12 December 2014 12:55:17 pm

Hi Heath,

I'm doing a fetch in a specific node in which I have a content which class type is "fiche_contact". This content has not been created directly in this node, it comes from another node and has been put in the node in which I'm doing my fetch automatically by the system when I used "Locations" tab from its original node (in the admin console). 

Now, what I try to do is to display this content (using a fetch to get it). But it seems that, because of the fact that I didn't create it directly in the node where I'm doing my fetch and  therefore because of the fact that this content has been simply located there using "Locations" tab, I can't get it using my fetch command.

So, the question is : what should I do to get this content ?

I hope it has been clearer for you. Sorry, but it's the first time I try to display multi-location contents in my templates and I've been trying to find solutions in forums but found no clear answer.

If you need more, don't hesitate. Many thanks.

Friday 12 December 2014 4:07:28 pm

Finally I found what was wrong. My class was in a specific section and this section didn't have the rights for anonymous users. Fixing this made content displayed correctly.

Sorry for this blunder !!!

Saturday 13 December 2014 12:50:42 am


No worries. I'm glad you found the answer!

Could you help us out and login to share.ez.no and click the question resolved icon at the top of your original forum message title?

It's the box with the checkbox inside. It turns green when you have clicked it correctly.

Doing this indicates your question has been solved.

Thanks again for your continued support!

Apologies for my late reply.


Modified on Saturday 13 December 2014 12:51:15 am by // Heath


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

36 542 Users on board!

Forums menu

Proudly Developed with from