Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.0, 5.1, 5.2, 5.3
-
eZ Publish 5.2
Description
When creating or updating ezxml field content through the public API, an entry is created in the ezurl table, but not to the ezurl_object_link table.
This causes the urls to later be incorrectly considered "orphaned" and removed (see eZUrl fieldType).
This behavior is reproducible in eZ Publish 5.2
With something like the following:
$content = $contentService->loadContent( $contentId ); $contentXmlString = <<<EZXML <?xml version="1.0" encoding="utf-8"?> <section xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/" xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"> <paragraph>This is a <link href="http://overlink.com">paragraph link.</link></paragraph> </section> EZXML; $cleanEzxmlInput = new EzXml( $contentXmlString ); $contentInfo = $contentService->loadContentInfo( $contentId ); $contentDraft = $contentService->createContentDraft( $contentInfo ); $contentUpdateStruct = $contentService->newContentUpdateStruct(); // updates the content $contentUpdateStruct->setField( 'body', $cleanEzxmlInput ); $contentDraft = $contentService->updateContent( $contentDraft->versionInfo, $contentUpdateStruct ); $content = $contentService->publishVersion( $contentDraft->versionInfo );
You will be able to see the link being added to the ezurl table, but not to ezurl_object_link table, and it should, like it does when creating/editing contend from the administration backend.