-
1. Re: RTE in multifield is not working as expected
smacdonald2008Jan 9, 2018 2:38 PM (in response to trc41594544)
This is a bug. Please open a support ticket to it can be fixed.
-
2. Re: RTE in multifield is not working as expected
smacdonald2008Jan 9, 2018 3:03 PM (in response to trc41594544)
Tomorrow - i am going to test Coral/Granite MF for 6.3 on same use case.
-
3. Re: RTE in multifield is not working as expected
smacdonald2008Jan 9, 2018 4:58 PM (in response to trc41594544)
How are you writing out the value of the RTE in HTL?
-
4. Re: RTE in multifield is not working as expected
trc41594544 Jan 10, 2018 6:19 AM (in response to smacdonald2008)Hi,
Thanks for the reply. As we are using ACS AEM commons multifiled, we are storing RTE data in JSON. We use WcmUsePojo to get the property in to back end, process the JSON and use that in output in HTL.
I added loggers in Java and checked also, the property value is not having href at all there also. I think the issue is occurring as soon as you open the dialog, it is stripping out href.
Hope this answered your question.
Thanks
-
5. Re: RTE in multifield is not working as expected
smacdonald2008Jan 10, 2018 11:00 AM (in response to trc41594544)
I am doing this use case right now to verify if i can reproduce your results on AEM 6.2.
-
6. Re: RTE in multifield is not working as expected
smacdonald2008Jan 10, 2018 11:26 AM (in response to smacdonald2008)
-
7. Re: RTE in multifield is not working as expected
smacdonald2008Jan 10, 2018 11:30 AM (in response to smacdonald2008)
The JSON in the prop at /content/mfHTL62/en/jcr:content/par/touchmulti is this format:
"title":"Scott2",
"path":"Scott4",
"flag":"Flag22",
"text":"<p>Hello There - this is <a href=\"http://www.cnn.com\">CNN</a></p>\n"
}
You can see the href is still there.
-
8. Re: RTE in multifield is not working as expected
trc41594544 Jan 10, 2018 11:31 AM (in response to smacdonald2008)Hi,
Thanks for trying. Could you be able to provide the code in a package? I will install that package in our AEM instances and check whether i can re-produce or not.
Thanks for your help.
-
9. Re: RTE in multifield is not working as expected
smacdonald2008Jan 11, 2018 6:40 AM (in response to trc41594544)
I will update our MF 6.2 article and put in all the code and package. Check back in a day or so to see this article updated with RTE that works -- Scott's Digital Community: Creating an AEM 6.2 HTML Template Language component that uses a Multi-Field dialog
Package is updated with output that includes links from a RTE -- as shown here:
-
10. Re: RTE in multifield is not working as expected
trc41594544 Jan 11, 2018 7:00 AM (in response to smacdonald2008)Thanks for taking the effort to test it in your instances.
I installed the package that is present in the link to test the RTE. At first it worked as expected with link and everything. Once i open the dialog and save it again, HREF got removed. This determines it is definitely system issue of ours.
I ran out of ideas to debug. I was wondering is there a configuration somewhere which would think HREF is invalid and removing it when clicked on Save?
Thanks for any thoughts or suggestions.
-
11. Re: RTE in multifield is not working as expected
smacdonald2008Jan 11, 2018 7:01 AM (in response to trc41594544)
Can you post here the output you see.
-
12. Re: RTE in multifield is not working as expected
smacdonald2008Jan 11, 2018 7:03 AM (in response to smacdonald2008)
Also - try testing on a fresh AEM 6.2 instance so you can see it working
-
13. Re: RTE in multifield is not working as expected
trc41594544 Jan 11, 2018 7:08 AM (in response to smacdonald2008)Hi,
I am seeing the below HTML in page source.
<div>
<p><b>Page Name:</b> PageA</p>
<p><b>Page Path:</b> PathA</p>
<p><b>Flag:</b> FlagA</p>
<p>Hello There - this is <a>CNN</a></p>
<p><b>Page Name:</b> PageB</p>
<p><b>Page Path:</b> PathB</p>
<p><b>Flag:</b> FlagB</p>
<p>This is <a target="_blank">ABC News</a></p>
</div>
If you notice that there is no HREF.
Thanks
-
14. Re: RTE in multifield is not working as expected
smacdonald2008Jan 11, 2018 7:14 AM (in response to trc41594544)
Can you test on a fresh AEM 6.2 instance. I want to know if you see this working on a fresh AEM 6.2 instance.
On your original instance - there is something that is manipulating the JSON.
-
15. Re: RTE in multifield is not working as expected
trc41594544 Jan 11, 2018 7:24 AM (in response to smacdonald2008)I tried on a clean AEM instance by installing ACS AEM Commons and the RTE package. In the instance it did worked as expected.
HREF did not got removed after saving.
-
16. Re: RTE in multifield is not working as expected
smacdonald2008Jan 11, 2018 7:32 AM (in response to trc41594544)
OK - now we are getting some where. IN your instance where IT DOES NOT work - when you look at the props under content -- here:
/content/mfHTL62/en/jcr:content/par/touchmulti
Are you seeing the link removed from the props?
-
17. Re: RTE in multifield is not working as expected
trc41594544 Jan 11, 2018 7:36 AM (in response to smacdonald2008)Hi,
Yes, the link is removed from the properties. As i saw until now, HREF is getting removed when clicked on Save after modifying the content. The JSON call to the backend is going without HREF.
Thanks
-
18. Re: RTE in multifield is not working as expected
smacdonald2008Jan 11, 2018 8:00 AM (in response to trc41594544)
Do you have a link modifier service active that would account for this - something is modifying that RTE prop. As you can also see - that something is not turned on by default as it works on the Fresh instance. See -- Linkchecker removing href value
-
19. Re: RTE in multifield is not working as expected
smacdonald2008Jan 11, 2018 9:15 AM (in response to smacdonald2008)
One possible reason on your instance is the XSS filter stripping out the HRef -- XSS Filter issue with the target attribute of the a tag
-
20. Re: RTE in multifield is not working as expected
trc41594544 Jan 11, 2018 9:22 AM (in response to smacdonald2008)Hi,
I kind of looked in to the XSS part. I am going to try few more things here but the thing is when you save the first time it works but it does not work the second time you open and save the dialog.
If there is any XSS issue, it should not have saved when clicked first time. This is happening i believe after the upgrade to 6.2 but we did not noticed it until now. So, looking in to any multi field related JS files.
I tried without multi field and RTE works as expected. I think this is because of some Multi Filed issue with Acs commons.
Thanks
-
21. Re: RTE in multifield is not working as expected
smacdonald2008Jan 11, 2018 9:25 AM (in response to trc41594544)
"some Multi Filed issue with Acs commons" - then we would see this with Fresh instance - but it works.
I am going to test on Coral/Granite MF too - that one for 6.3 does not need an ACS-Commons.