Forums / Developer / Upgrade custom tag from eZ3.10.0 to eZ4.4

Upgrade custom tag from eZ3.10.0 to eZ4.4

Author Message

Wei Dai

Tuesday 30 November 2010 6:40:40 am

Hi, I upgraded the system from eZ3.10.0 to eZ4.4 by following the instruction in the upgrade document step by step. Everything is great so far, except the custom tags in my xml block attributes.

The custom tags can't be shown on the page. In the debug output, it indicates the corresponding tpl file is loaded, but, no content.

It strange that, if I go to the BO, just hit edit an content object with this kind of custom tag, then do nothing hit publish. I need do so twice, then the content will be shown on the page!

I looked at the DB tables, and the code, it seems the stored xml text in the DB has wrong structure than the newer version of the eZ.

I have many content objects, so don't want to correct the problem manually like above.

Since above, it seems the eZ Publish system can somehow fix the problem, because I can do nothing on the content when editing, I am thinking there are must be a way to write a script to covert the custom tags automatically.

However, according what I read the kernel code so far, it seems very complicated on the process of store and parsing the xml text data. I have spent much time now and seem no results!

Can someone give me some directions or articles on this matter? Thank you very much!

Certified eZ Publish 4 developer looking for develop information & collaboration.

André R.

Tuesday 30 November 2010 7:05:03 am

Whats the difference between the before and after xml source?

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

Karol Radziuk

Tuesday 30 November 2010 7:08:32 am

Hi,

last week I had a similar problem. Maybe this will be helpful: #017671

{$me|attribute(show,1)}

peng bihao

Tuesday 30 November 2010 7:38:47 pm

hi,André . I have the same problem ,and can't solve it too.the old custom tag XML source is like this:

<paragraph>
<custom name="cadreBlancOmbrePorte">
<paragraph>
<strong>INSCRIPTIONS EN LIGNE POSSIBLE</strong>
</paragraph>
</custom>
</paragraph>

and when i just modified it directly in the database like this:

<paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">
<custom name="cadreBlancOmbrePorte" custom:type="custom">
<paragraph>&amp;nbsp;
<strong>INSCRIPTIONS EN LIGNE POSSIBLE</strong>
&amp;nbsp;
</paragraph>
</custom>
</paragraph>

then the content of custom tag can be display in the page.but sometimes if the structure of the custom tag is very intricacy。 it may not works. do you know how ezoe3 handle custom tag and store into database ? and what about ezoe4?

André R.

Wednesday 01 December 2010 6:50:42 am

Guess you mean ezoe 4.x vs 5.x?

There is a possibility that this issue is caused by changes to the xml handler in 4.2 & 4.3 and not the editor. Did it work on either of those versions?

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

Nicklas Lundgren

Monday 27 December 2010 1:21:24 pm

Hi,

Is this thread still alive?

I have the same problem with a huge website that we have upgraded from 3.8.4 to 4.3.

Some of the content is not shown in the upgraded website. When tracking the problem, I found out that attribute_view_gui on xml-datatypes doesnt return anything at all.

Going further into the kernel, I have tracked the problem to kernel/classes/datatypes/ezxmltext/ezxmltextoutputhandler.php and the function &outputText.

The function do get hold of the xml-data ($this->XMLData ), but when returning the output, it is set to noting ('')

I can see that there is a LOT of references to ez publish 3 temporary namespaces in the erroneous contentobjects. Like this:

<line xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">

Such lines do not occur in content objects that are working. I am guessing that some kind of processing is meant to occur when processing this data. But something must go really wrong there...

André - you use to be able to provide really helpful information about problems like this. I am hoping for you to reply and give me some directions on where to find the source of this problem.

Cheers,

/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

André R.

Monday 27 December 2010 11:40:30 pm

Hi Nicklas!

XMLhandlers at play here, the issue you describe is an known issue in 4.3 and should be fixed in 4.4.

For the relevant fixes, take a look here:

https://github.com/ezsystems/ezpublish/commits/master/kernel/classes/datatypes/ezxmltext

Specifically: https://github.com/ezsystems/ezpublish/commit/9df764fc6561e0464ee4705f1365726929716a23

If this (upgrading either ezp or only datatype just to test) does not help then please open an new issue and attache the raw ezxml direclty from the database that is causing it.

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

Nicklas Lundgren

Tuesday 28 December 2010 12:55:21 pm

André:

If we should meet - remind me that I should buy you a beer, or two! :-)

You pointed out exactly the right solution to our problem. Thanks!

I applied the patch for issue nr.016814 to our 4.3 website and the content appeared instantly - like magic.

However -one small thing remains to be handled. When republishing content, the system appear to add extra spaces in front of lines, in this manner:

&nbsp<b>This is some bold text</b>
  &nbspThis is some more text.

The non-breaking-space-character in the beginning of the lines were not there before.

Please note that this only occurs after publishing the content. If I dont touch it, it stays as it was before the upgrade to 4.3.

Maybe its the same problem as mentioned here?

http://share.ez.no/forums/setup-design/nbsp-being-added-after-bold-tag/(language)/eng-GB

Thanks again, André. Your help is really appreciated!

Best regards,

/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

André R.

Monday 03 January 2011 3:45:20 am

Hi, I'll try to remember about that beer :)

About nbsp, still an issue, and only real solution atm is to disable it again, by reverting these:

https://github.com/ezsystems/ezpublish/commit/763bad6c43163765dfa296a65556ba568e9ee4f8

https://github.com/ezsystems/ezpublish/commit/054b058e092e5d56af8f7e5ebaad770215378df6

BUT!

According to this issue it is intended behavior: http://issues.ez.no/17555

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 30 2025 04:40:45
Script start
Timing: Jan 30 2025 04:40:45
Module start 'content'
Timing: Jan 30 2025 04:40:45
Module end 'content'
Timing: Jan 30 2025 04:40:46
Script end

Main resources:

Total runtime0.3547 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0100 588.0625370.2813
Module start 'content' 0.01000.0180 958.34381,017.8125
Module end 'content' 0.02800.3267 1,976.15633,906.7734
Script end 0.3547  5,882.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00481.3539200.0002
Check MTime0.00130.3722200.0001
Mysql Total
Database connection0.00070.205210.0007
Mysqli_queries0.242368.31541410.0017
Looping result0.00160.44381390.0000
Template Total0.326191.910.3261
Template load0.00090.253410.0009
Template processing0.325291.679010.3252
Override
Cache load0.00060.169410.0006
Sytem overhead
Fetch class attribute can translate value0.00220.609410.0022
XML
Image XML parsing0.00030.093810.0003
General
dbfile0.00732.0588200.0004
String conversion0.00000.001730.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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