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

Embed image link removed on edit content

    XMLWordPrintable

    Details

      Description

      Issue:
      After content migration from XMLBlock to RichText, some linked embed images have <ezlink> above <ezconfig> element.

      For example, resulting XML can look like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">
      
      <ezembed xlink:href="ezcontent://72862" view="embed" ezxhtml:class="no_border ez-embed-type-image">
      <ezlink xlink:href="ezcontent://72869" xlink:show="new" xlink:title="Wakulla Caves Forest | opens in a new window."/>
      <ezconfig><ezvalue key="size">original</ezvalue><ezvalue key="offset">0</ezvalue><ezvalue key="limit">5</ezvalue><ezvalue key="promowidth">none</ezvalue></ezconfig>
      </ezembed>
      
      <ezembed xlink:href="ezcontent://72862" view="embed" ezxhtml:class="no_border ez-embed-type-image">
      <ezconfig><ezvalue key="size">original</ezvalue><ezvalue key="offset">0</ezvalue><ezvalue key="limit">5</ezvalue><ezvalue key="promowidth">none</ezvalue></ezconfig>
      <ezlink xlink:href="ezcontent://72869" xlink:show="new" xlink:title="Wakulla Caves Forest | opens in a new window."/>
      </ezembed>
      
      </section>
      

      Both embed objects are valid, as order of ezlink & ezconfig should not matter here, but they are processed differently by CKEditor.

      AR: After such field opened in AdminUI and parsed by CKEditor, <ezlink> element removed if it is located before ezconfig (and works find if it's located after ezlink).
      ER: Embed link works disregard order of <ezconfig> and <ezlink> elements.

      Notes:
      It's not reproducible for me on latest ezplatform v3.
      Debug shows that link element removed by CKEditor inside "CKEDITOR.htmlParser.fragment.fromHtml" function. Probably, related to "hasInlineStarted" variable, but I'm not sure (hard to debug minified editor code).

      PR: https://github.com/ezsystems/ezplatform-admin-ui/pull/1255

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            diaborn Ivan Ternovtsiy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: