This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » Error using...

Error using eZContentObjectTreeNode::fetchByURLPath (can't access node)

Error using eZContentObjectTreeNode::fetchByURLPath (can't access node)

Wednesday 29 December 2010 9:49:04 am - 1 reply

Hi there,

I have a problem with a little piece of code :

$content = eZContentObjectTreeNode::fetchByURLPath( $chemin_reel ) ;

For the following content tree :

 `- Annonces
   |- Un dossier
   | `- Une annonce 1
   |- Un autre dossier
   | |- Une annonce 2
   | `- Une annonce 3
   `- Une annonce 

I want to get the folders : "Annonces", "Annonce/Un dossier" and "Annonces/Un autre dossier".

When I fetch with $chemin_reel = 'Annonces'; it works.
Bit if I want to fetch with $chemin_reel = 'Annonces/Un-dossier'; (wich is the name in the URL in administration panel), it doesn't work.

I don't understand why the first node return the correct object and why the others nodes don't.

Could someone explain me ?

Thanks Damien

Wednesday 29 December 2010 3:17:52 pm

Hi there. If you take a look at the code you will see this function uses path_identification_string for getting the node

to be brief, path_identification_string is a field of ezcontentobjecttreenode table. have a look at that table with phpmyadmin or something and you will see that none of the records has 'Annonces/Un-dossier' for this field. probably they will have something like 'Annonces/Un_dossier'...Note the underscore instead of the dash.

hope this give you a hint happy.gif Emoticon.


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

36 542 Users on board!

Forums menu

Proudly Developed with from