Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Issues with source-edit mode in RTE

Avatar

Level 5

Hello Community - I have an issue related to the content(HTML/Text) added in RTE source-edit mode is lost. Once the content is added in RTE and click "Done". I have verified the below. Can someone tell me what is causing the issue?

 

Step 1: Checked content node in CRX/DE and found that the saved changes is not there.
Step 2: Which means it is not related to XSS issue. If it is an XSS issue, the saved HTML will be captured in CRX/DE and it will be removed by XSS.
Step 3: Moreover, this is not a consistent issue. Sometimes, it is working and sometimes it doesn't.
Step 4: Verified the logs once the content is authored in RTE but no issues found in logs when the content is not saved in RTE.
Step 5: No issues found in browser console.

Step 6: Tried with various user accounts including admin but no luck.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Can you check once if anything missed in RTE code.

 

Below is the sample code of RTE that you can give a try

 

<headline jcr:primaryType="nt:unstructured" sling:resourceType="/libs/cq/gui/components/authoring/dialog/richtext" fieldDescription="Enter Headline Text" fieldLabel="Headline" name="./headline" useFixedInlineToolbar="{Boolean}true">
<rtePlugins jcr:primaryType="nt:unstructured">
<subsuperscript
jcr:primaryType="nt:unstructured"
features="*"/>
</rtePlugins>
<uiSettings jcr:primaryType="nt:unstructured">
<cui jcr:primaryType="nt:unstructured">
<inline
jcr:primaryType="nt:unstructured"
toolbar="[#format]">
<popovers jcr:primaryType="nt:unstructured">
<format
jcr:primaryType="nt:unstructured"
items="[subsuperscript#superscript]"
ref="format"/>
</popovers>
</inline>
</cui>
</uiSettings>
</headline>

 

Regards

Praveen

View solution in original post

10 Replies

Avatar

Employee Advisor

@v1101 

Are you using any custom html tags/ attributes in source edit? Do you see the content in the UI after closing the edit dialog?

This would mostly happen if you're trying to add some custom (not allowed) html tags/ attributes.

Avatar

Level 5
@shelly-goel - We dont use any custom html tags in source edit. Content is showing sometimes and sometimes doesn't. It is not related to custom html tags.

Avatar

Employee Advisor
And do you see the content in the UI? Can you please share an example of content which you added in aource edit, appears in UI but not in crx/de.

Avatar

Level 5
@shelly-goel - Content is showing in the UI sometimes and sometimes it doesn't. This is the case for only changing the text in the RTE (Not adding any tags or html)

Avatar

Employee Advisor

Is the HTML well formed and balanced ?Check if all the tags are opened and closed correctly. What version of AEM you are running ? Also, try this operation in different browsers as well. 

If there are no custom HTML tags then it could be related to attributes of tag as well. Certain tags or attributes might get removed because of antisamy rules. You can find more details here - https://helpx.adobe.com/experience-manager/kb/target-attribute-issue-tag.html 

Avatar

Level 5
@Kunal_Gaba_ - The HTML is well formed. This is happening in 6.5 version. All the tags are properly closed. If it is XSS issue, the values will be saved in crx/de but in my case, the values are not saving in crx/de. This is happening even if we change only the content/text scenarios as well.

Avatar

Employee Advisor
Check your error log when you submit the RTE dialog. Are you using classic UI or Touch UI? Another thread which may help you - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/rte-quot-source-edit-quot-...

Avatar

Level 5
@Kunal_Gaba_ - I have already verified the error logs imeediately after the action but no useful details in the logs. I have already checked the link and it talks about XSS issue. in my case, this is not XSS issue.

Avatar

Correct answer by
Level 4

Can you check once if anything missed in RTE code.

 

Below is the sample code of RTE that you can give a try

 

<headline jcr:primaryType="nt:unstructured" sling:resourceType="/libs/cq/gui/components/authoring/dialog/richtext" fieldDescription="Enter Headline Text" fieldLabel="Headline" name="./headline" useFixedInlineToolbar="{Boolean}true">
<rtePlugins jcr:primaryType="nt:unstructured">
<subsuperscript
jcr:primaryType="nt:unstructured"
features="*"/>
</rtePlugins>
<uiSettings jcr:primaryType="nt:unstructured">
<cui jcr:primaryType="nt:unstructured">
<inline
jcr:primaryType="nt:unstructured"
toolbar="[#format]">
<popovers jcr:primaryType="nt:unstructured">
<format
jcr:primaryType="nt:unstructured"
items="[subsuperscript#superscript]"
ref="format"/>
</popovers>
</inline>
</cui>
</uiSettings>
</headline>

 

Regards

Praveen