Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-707

RichTextConverterExtension might fail in some edge cases

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Medium Medium
    • Customer request, 3.3.7
    • 3.3.5
    • Content
    • None
    • Ibexa Content

    Description

      In case of any libxml errors, this line would fail due to potential false value being returned https://github.com/ezsystems/ezplatform-richtext/blob/master/src/bundle/Templating/Twig/Extension/RichTextConverterExtension.php#L62.

      Return value of EzSystems\EzPlatformRichTextBundle\Templating\Twig\Extension\RichTextConverterExtension::richTextToHtml5() must be of the type string, bool returned error
      

      Therefore we need to apply a proper check and (if possible) add logging for the specific error that has occurred.

      The issue will most likely appear under the following circumstances:
      1. libxml2 upgraded to version 2.9.10/2.9.12,
      2. an empty RichText field rendered e.g. from CLI:

      php -r 'var_dump((new DOMDocument)->saveHTML());'
      

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              konrad.oboza@ibexa.co Konrad Oboza
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: