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

trim error in rich text

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • 3.3.12
    • Content, Experience
    • Active migration from eZ platform

       

      Dockerized environment
      php:7.3-fpm-alpine3.12
      mariadb:10.3redis:6-alpine
      solr:7.7.2

    • Ibexa Experience

    Description

      There are several cases where the CustomTags require other CustomTags inside for their correct visualization, however, in the new versions of ibexa 3.3 there may be some problems. If you are editing content that contains a "parent" CustomTag that in turn has child CustomTags, you must make sure that the parent has at least one blank space before the child CustomTags, otherwise the error will appear:

      "trim() expects parameter 1 to be string, bool given".

      After several tests, it was identified that the above error is generated during rendering and after having stored the xml content in the database, this type of error generates a huge crash, since it does not allow to modify or display the content.

      Here is an example of the XML fragment in the database that does NOT generate an error:

      Here is an example of the XML fragment with the trim error:

      As evidenced in the previous images, Ibexa generates an error due to the lack of content such as the blank space <para> </para> (on line 3).

      The editor requires removing the white space at the beginning of CustomTag, and at the moment of doing so, you can lose control of its content due to this error, it is serious.

      Recreation:
      1. Create a custom "parent" tag, for example an "Accordion":

      2. Create a custom tag "child" inside the "parent", for example an "Accordion item"

      3. Remove the space (paragraph) before the "Accordion item"

      4. Save or publish the content. You will get the error:

       

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              cesaraz455 cesaraz455
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: