Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29484

ezxmltext -> richtext conversion : Paragraphs containing text and block elements could mistakenly by considered temporary

    XMLWordPrintable

    Details

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vidar.langseid@ez.no Vidar Langseid
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: