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

RichText: conversion and validation from Legacy ezxml involving temporary paragraphs

    Details

      Description

      In EZP-24710 it was reported that ezxmltext datatype in Legacy Stack will not create temporary namespace attributes on temporary paragraphs when Online Editor is disabled. That issue reports the problem with rendered output with XmlText, but the same problem causes issues with RichText's ezxml -> docbook conversion.

      In that case converter will not remove temporary paragraphs as it expects them to be properly marked, resulting in nested paragraphs, like <para><para>...</para></para>.

      Additionally, the schema of RichText's internal format (docbook) allows for that, so it also needs to be fixed.

        Issue Links

          Activity

          Hide
          Petar Spanja (Inactive) added a comment -

          While working on https://jira.ez.no/browse/EZP-24925, I've found out that republishing Content (with editor enabled) will fix the inconsistency regarding temporary paragraphs + some other issues with inconsistent XML data.

          Rather than handling all Legacy Stack XmlText variations in RichText, we should rather handle the format as it is produced normally through the Online Editor and use Legacy Stack ezxml parser to clean the input before passing it to RichText conversion.

          Show
          Petar Spanja (Inactive) added a comment - While working on https://jira.ez.no/browse/EZP-24925 , I've found out that republishing Content (with editor enabled) will fix the inconsistency regarding temporary paragraphs + some other issues with inconsistent XML data. Rather than handling all Legacy Stack XmlText variations in RichText, we should rather handle the format as it is produced normally through the Online Editor and use Legacy Stack ezxml parser to clean the input before passing it to RichText conversion.
          Hide
          Damien Pobel (Inactive) added a comment -

          I guess we need to implement the same thing as in EZP-24710 / https://github.com/ezsystems/ezplatform-xmltext-fieldtype/pull/5 ie sort out the temporary paragraphs to ignore those that are really temporary from those which seem to be created because of bugs in legacy input parsers.

          Show
          Damien Pobel (Inactive) added a comment - I guess we need to implement the same thing as in EZP-24710 / https://github.com/ezsystems/ezplatform-xmltext-fieldtype/pull/5 ie sort out the temporary paragraphs to ignore those that are really temporary from those which seem to be created because of bugs in legacy input parsers.
          Hide
          André Rømcke added a comment - - edited

          [~damien.pobel@ez.no] Is this duplication of EZP-24710? As in can this be closed given the current migration uses XmlText where you fixed this?

          Show
          André Rømcke added a comment - - edited [~damien.pobel@ez.no] Is this duplication of EZP-24710 ? As in can this be closed given the current migration uses XmlText where you fixed this?
          Hide
          Vidar Langseid added a comment - - edited

          Petar proposes to use the legacy stack OE ezxml parser to clean up the input before passing it to RichText conversion.
          The problem with that apporach is that the ezxmltext->xhtml converter in legacy has dependencies to other legacy stuff ( not limited to eztemplate, and ezini ). The xhtml->ezxmltext is quite isolated though and could be used in eZ Platform without too much modifications.

          Anyway, what the ezxmltext->xhtml OE converter in legacy seems to do is to just ignore the existence of the "temporary" namespace.
          So, my approach for fixing this will be the same ( ignore the namespace).

          Show
          Vidar Langseid added a comment - - edited Petar proposes to use the legacy stack OE ezxml parser to clean up the input before passing it to RichText conversion. The problem with that apporach is that the ezxmltext->xhtml converter in legacy has dependencies to other legacy stuff ( not limited to eztemplate, and ezini ). The xhtml->ezxmltext is quite isolated though and could be used in eZ Platform without too much modifications. Anyway, what the ezxmltext->xhtml OE converter in legacy seems to do is to just ignore the existence of the "temporary" namespace. So, my approach for fixing this will be the same ( ignore the namespace).
          Show
          Vidar Langseid added a comment - PRs https://github.com/ezsystems/ezplatform-xmltext-fieldtype/pull/42 https://github.com/ezsystems/ezpublish-kernel/pull/2329

            People

            • Assignee:
              Unassigned
              Reporter:
              Petar Spanja (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: