Forums / Developer / ezpublish 4 and xmlimport: bug with ezxmltext

ezpublish 4 and xmlimport: bug with ezxmltext

Author Message

sergio da silva

Wednesday 20 August 2008 5:53:07 am

Hello,

i installed the extension "XMLImport":
http://ez.no/jp/developer/contribs/import_export/xmlimport

I'm trying to import a XML file:

 

<my_import>
	<article>
		<title>title</title>
		<short_title>short</short_title>
		<enable_comments>true</enable_comments>
		<unpublish_date>Sun, 7 Sep 2008 16:21:42</unpublish_date>
		<intro>test <b>test</b></intro>
	</article>
</my_import>

But it doesn't work, i have an error for the field "intro" which is a XML block (I understood it 's a ezxmltext datatype):
"Fatal error: Call to a member function elementsByName() on a non-object in C:\wamp\www\extension\xmlimport\modules\xmlimport\ezXMLTextConverter.php on line 53".

But in the doc, the ezxmltext is supported.

Do i have to change something in my code?

thanks

André R.

Wednesday 20 August 2008 6:15:00 am

Looks like a eZ Publish 4 / Php 5 incompatibility.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

sergio da silva

Wednesday 20 August 2008 8:06:10 am

Aie, too bad!!

Can another extension do it (from CSV or XML file)? (i'm testing on local with windows)

thanks for the answer!

Gabriel Finkelstein

Wednesday 20 August 2008 9:48:29 am

I think the xmlimport extension supports xmltext, not html.

And you should use:

<intro><![CDATA[test <b>test</b>]]></intro>

sergio da silva

Thursday 21 August 2008 8:59:43 am

It doesn't work :( snif

Gabriel Finkelstein

Thursday 21 August 2008 9:14:09 am

Try something like this

<intro><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
         xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
         xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
<section>
   <paragraph>
      test <strong>test</strong>
   </paragraph>
</section>]]></intro>

André R.

Thursday 21 August 2008 9:15:42 am

Why don't you try an extension that works on eZ Publish 4.0??

http://ez.no/developer/contribs/import_export/data_import

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

sergio da silva

Friday 22 August 2008 1:48:56 am

this code isn't working :(

<intro><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
        xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
        xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
<section>
  <paragraph>test <strong>test</strong></paragraph>
</section>]]></intro>

About the extension "data_import", how can i use it on the admin interface? There isn't "modules" folder!

It's (i'm sure!!!) a stupid question from me but the future admin has to have an easy way to use this extension.

data_import: http://ez.no/developer/contribs/import_export/data_import

one more time, thanks for your help

André R.

Friday 22 August 2008 2:08:19 am

data_import is a console import tool, and for good reasons( no timout issues, no memory limit issues.. ).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom