Monday 08 March 2010 7:59:11 am
Hi, I have a problem with an XMLBlock filled from PHP :
$params = array();
$params['parent_node_id'] = 2;
$params['class_identifier'] = 'article';
$params['creator_id'] = 14;
$params['section_id'] = 1;
$attributesData = array();
$attributesData['title'] = 'My article';
$attributesData['body'] = $content;
$params['attributes'] = $attributesData;
$contentObject = eZContentFunctions::createAndPublishObject( $params ); The content of $content is a valide ez xml code : <?xml version="1.0" encoding="utf-8" ?>
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/">
<header level="1">My Title</header>
<link href="http://my.url.tld/pages/infos.php">
<embed align="left" view="embed" size="medium" href="ezobject://372"/>
</link>
Hello World
</section>
Note : The ezobject with ContentObjectID = 372 has been created just before from the same extension. (It's an image) The problem is :
- When I watch the preview of the article from the admin, there is no image.
- When I edit the article with the online editor, it stops at the link (No "Hello World" string)
- When I edit directly the source, the href attribute is empty :
<embed align="left" view="embed" size="medium" href=""/>
But if I modify the embed tag and put ezobject://372, the image appears correctly. So, the question is : Why does eZ don't take my embeded object correctly at the article creation while editing it to put the same value works ? I can't do it manually on each page, because their will be a lot of page imported by the extension (500+). Thanks in advance, Damien
|