Forums / Developer / Convert Text Block -> XML Block

Convert Text Block -> XML Block

Author Message

Ruben van Eijnatten

Thursday 01 December 2005 3:56:30 am

Because I would like to make use of en eZ Online Editor I need to change all fields in my class definitions that are currently Text Blocks to XML Blocks. This is not a problem, however the data stored in the old text blocks is not converted to XML Block data. Obvously it is nog acceptable to loose all existing data.

What would be the best way to go about this change from text blocks to XML blocks with the preservation of the data stored in de text block fields?

Thanks for your help.

Tamer Solieman

Saturday 07 July 2007 4:46:15 am

This is my problem too.
need to convert text block to xml block or enable the editor to text block data tybe
thanks alot
:)

Major

Stefano Maffulli

Tuesday 28 August 2007 4:01:30 am

I'd guess this is impossible. That's bad. Did anybody have any luck with this?
/stef

--
: Stefano Maffulli : https://www.fsfe.org/en/fellows/maffulli/
`--------+----------+--------------------------------------------------.
Join the Fellowship of FSFE http://fsfe.org

André R.

Tuesday 28 August 2007 4:40:29 am

This is possible.

Use this extension:
http://ez.no/community/contribs/applications/object_content_class_change
And add a eztextblock to ezxmlblock translator...

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

Mauro Innocenti

Wednesday 05 September 2007 5:43:24 am

Right!
But exactly what are the eZ API PHP functions/methods for doing correct conversions?

Mauro Innocenti

Wednesday 05 September 2007 6:18:50 am

I found this hints:
http://ez.no/community/forum/deve...enerate_xml_to_insert_in_a_attribute

eZ debug

Timing: Jan 18 2025 11:15:40
Script start
Timing: Jan 18 2025 11:15:40
Module start 'content'
Timing: Jan 18 2025 11:15:40
Module end 'content'
Timing: Jan 18 2025 11:15:40
Script end

Main resources:

Total runtime0.0164 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 587.7109180.8359
Module start 'content' 0.00570.0051 768.546997.8672
Module end 'content' 0.01080.0056 866.414174.7031
Script end 0.0164  941.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002112.9997120.0002
Check MTime0.00105.9735120.0001
Mysql Total
Database connection0.00074.007510.0007
Mysqli_queries0.002716.242040.0007
Looping result0.00000.084220.0000
Template Total0.005231.710.0052
Template load0.00116.888210.0011
Template processing0.004124.823210.0041
Override
Cache load0.00063.831810.0006
General
dbfile0.00042.3740100.0000
String conversion0.00000.031930.0000
Note: percentages do not add up to 100% because some accumulators overlap

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