Details
-
Bug
-
Resolution: Unresolved
-
High
-
1.13.3, 2.2.2
-
None
Description
In a legacy database, I have found cases where paragraphs with tmp namespace containing an embed and some text.
Due to the existent of the embed tag, the ezxmltext -> richtext conversion tool mistakenly consider the paragraph as temporary and removes it. As result the text ends up directly in the <section>, instead of inside a <param> tag in richtext
<?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 xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/"> <embed align="left" view="embed" size="small" object_id="123"/>sometext</paragraph> <paragraph </section> </section>
Update : Initially, I thought this was just a problem for paragraphs just below sections... However, I now see cases where this happens other places too. Like :
<?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/"> <paragraph>foobar.</paragraph> <section> <header>my header</header> <paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/"> <ul> <li> <paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/"> <embed align="right" view="embed" object_id="123"/>foobartest </paragraph> </li> </ul> </paragraph> </section> </section>
So, I think we'll just have to check every paragraph, and if it contains text, it should not be temporary