Expand my Community achievements bar.

SOLVED

Lists in content change the succeeding element to <div>, from <p> | Content Fragment | Rich text multifield bug |

Avatar

Level 1

Hi All!
I could not find any information about this bug on the forum and the internet. Probably because it is hard to describe, but here we go.

I'm developing custom Content Fragments in AEM.

I have a custom Content Fragment Model, with couple of different fields.
When I use Multi Line Text Field with Rich text as the default-mime-type(default editor view) in the CF Model definition, inserting <ul> and <ol> list in that text field, in the Content Fragment, makes the next piece of content a <div> rather than a standard <p>.

It seams to be a bug, but I might be wrong. I hope also that this is the correct place to post/ask.

Please find an example below.

  • The last line in the Text Content : <div>12wqrqrwerwqrweqrwqer<br></div>
  • Usually when next line is started in Rich Text Editor it is a <p> rather than a <div> like in this example.
  • This happens for all fields that have the same type.

View of the Content Fragment editor:

PiotrKrK_0-1641207261775.png

Field Content read from the Content Fragment:

"<p>Aenean pulvinar mattis ultricies. Duis suscipit orci sit amet erat commodo, ornare porta est facilisis.</p>
<ul>
    <li>Integer mattis est enim, ut<br></li>
    <li>lacinia dolor mollis vitae.<br></li>
    <li>Nullam vitae justo in augue ullamcorper consequat ac sit amet ante.<br></li>
    <li>Maecenas non nulla et augue consequat convallis imperdiet vel orci. In accumsan vestibulum mi, in ornare magna
        facilisis at. Morbi vulputate lectus eros, quis accumsan risus sagittis eget. Mauris mauris elit, dignissim eu
        finibus et, aliquet quis ante. Phasellus a sollicitudin mauris. Etiam placerat, nibh a consequat porta, sem
        lorem congue arcu, non venenatis ligula urna nec sapien. Sed pretium efficitur aliquam. Maecenas euismod
        pharetra pretium.</li>
</ul>
<div>12wqrqrwerwqrweqrwqer<br></div>"

 

Text field setup in Content Fragment Model:

 

                        <about-this-product-content
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="dam/cfm/admin/components/authoring/contenteditor/multieditor"
                            cfm-element="About This Product - Content"
                            default-mime-type="text/html"
                            fieldDescription="Bla Bla Bla"
                            listOrder="2"
                            metaType="text-multi"
                            name="about-this-product-content"
                            renderReadOnly="false"
                            showEmptyInReadOnly="true"
                            valueType="string"/>

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@PiotrKrK, Thanks for sharing version number. I have checked on the same version you are working on, and indeed the issue occurs - so it is AEM 6.5.3 related bug. Base on my initial observation on newer versions of AEM I would suggest following solutions:

  1. Upgrade AEM version to newer SP, I did quick tests and it looks that on SP4 it is working fine - so assuming you do not wanted to do massive upgrade to the latest SP version - this could be an option.
  2. You can raise Adobe Support ticket and ask for hotfix for your current version of AEM.
  3. You can also try to fix issue on your own, however because this is core part of AEM this is not recommended option.

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @PiotrKrK, could you please share information what version of AEM you are using, what SP etc. I have checked it on AEM 6.5.8 (so it is AEM 6.5 with SP8), and on latest version which is AEM 6.5.11. In both cases it was working fine and I did not observed issue you have describe.

Avatar

Correct answer by
Community Advisor

@PiotrKrK, Thanks for sharing version number. I have checked on the same version you are working on, and indeed the issue occurs - so it is AEM 6.5.3 related bug. Base on my initial observation on newer versions of AEM I would suggest following solutions:

  1. Upgrade AEM version to newer SP, I did quick tests and it looks that on SP4 it is working fine - so assuming you do not wanted to do massive upgrade to the latest SP version - this could be an option.
  2. You can raise Adobe Support ticket and ask for hotfix for your current version of AEM.
  3. You can also try to fix issue on your own, however because this is core part of AEM this is not recommended option.