Thursday 20 August 2009 1:37:24 am
Hi, I wrote a script to import data in a eZ Publish site. I encounter issues when I want to store a link in a ezxmltext attribute : At first, all links are OK but after edition of any object, all imported links desappear. I found that it was because urls are stored in ezurl table but nothing in ezurl_object_link. Why doesn't eZContentFunctions::createAndPublishObject method store anything into ezurl_object_link in this case? Is there something to do after eZContentFunctions::createAndPublishObject to create the correct record into ezurl_object_link table? My code:
$text = '<a href="' . $href . '" target="_blank">' . $link_text . '</a>';
$attributes["body"] = $this->getXML($texte); // a method returning valid eZPublish XML
$param_creation = array(
'parent_node_id' => $parent_node_id,
'class_identifier' => 'breve',
'creator_id' => $creator_id,
'attributes' => $attributes);
$object = eZContentFunctions::createAndPublishObject($param_creation);
Friendly, Ben.
Benjamin Plaquevent
Project Manager
Smile
|