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

eZ debug

Timing: Jan 18 2025 19:27:20
Script start
Timing: Jan 18 2025 19:27:20
Module start 'content'
Timing: Jan 18 2025 19:27:21
Module end 'content'
Timing: Jan 18 2025 19:27:21
Script end

Main resources:

Total runtime0.8256 sec
Peak memory usage4,096.0000 KB
Database Queries214

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.2734180.8125
Module start 'content' 0.00550.6647 770.0859655.3047
Module end 'content' 0.67020.1553 1,425.3906344.4297
Script end 0.8256  1,769.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.5653210.0002
Check MTime0.00180.2184210.0001
Mysql Total
Database connection0.00090.105710.0009
Mysqli_queries0.738089.38672140.0034
Looping result0.00240.28482120.0000
Template Total0.794796.320.3974
Template load0.00200.244420.0010
Template processing0.792796.013320.3964
Template load and register function0.00020.023410.0002
states
state_id_array0.00090.103810.0009
state_identifier_array0.00060.078320.0003
Override
Cache load0.00180.2133460.0000
Sytem overhead
Fetch class attribute can translate value0.00140.166940.0003
Fetch class attribute name0.00180.2136110.0002
XML
Image XML parsing0.00140.173940.0004
class_abstraction
Instantiating content class attribute0.00000.0036140.0000
General
dbfile0.00300.3617340.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs