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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:21:23
Script start
Timing: Jan 31 2025 06:21:23
Module start 'layout'
Timing: Jan 31 2025 06:21:23
Module start 'content'
Timing: Jan 31 2025 06:21:23
Module end 'content'
Timing: Jan 31 2025 06:21:23
Script end

Main resources:

Total runtime0.0166 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 588.2734151.2266
Module start 'layout' 0.00710.0027 739.500036.6797
Module start 'content' 0.00980.0053 776.1797102.3125
Module end 'content' 0.01510.0015 878.492241.9922
Script end 0.0165  920.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002414.6413140.0002
Check MTime0.00106.2129140.0001
Mysql Total
Database connection0.00169.419510.0016
Mysqli_queries0.002213.418330.0007
Looping result0.00000.085010.0000
Template Total0.00127.110.0012
Template load0.00095.491210.0009
Template processing0.00031.570210.0003
Override
Cache load0.00063.480310.0006
General
dbfile0.00031.682580.0000
String conversion0.00000.053340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs