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

    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

        Activity

        Show
        Vidar Langseid added a comment - PR : https://github.com/ezsystems/ezplatform-xmltext-fieldtype/pull/62
        Show
        Vidar Langseid added a comment - Merged in https://github.com/ezsystems/ezplatform-xmltext-fieldtype/commit/3da761a60a1f2caeecee2b500993206c8ce7a03c

          People

          • Assignee:
            Unassigned
            Reporter:
            Vidar Langseid
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: