Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

RTE in multifield is not working as expected

Avatar

Avatar
Validate 1
Level 3
trc41594544
Level 3

Likes

16 likes

Total Posts

43 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
trc41594544
Level 3

Likes

16 likes

Total Posts

43 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
trc41594544
Level 3

09-01-2018

Hi all,

I am using AEM 6.2 SP1 CFP9. I am running in to issues with rich text editor in multi field. I copied richtext present at  /libs/cq/gui/components/authoring/dialog/richtext in to apps. I created a component with multi field using ACS AEM Commons multi field widget, i have rich text in mutifield.

The problem is when i create link in RTE and save for the first time, link will be working. If i open the dialog and save RTE again even with out editing, It is removing href and saving the data.

For example: if i have link as <a href="https://forums.adobe.com/content/geo/a.html" target="_self">Link 1</a> in the first save. If i open the dialog and save it again, it is transforming to

<a target="_self">Link 1</a>"

Any thoughts on this issue would be helpful.

Thanks

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

09-01-2018

This is a bug. Please open a support ticket to it can be fixed.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

09-01-2018

Tomorrow - i am going to test Coral/Granite MF for 6.3 on same use case.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

09-01-2018

How are you writing out the value of the RTE in HTL?

Avatar

Avatar
Validate 1
Level 3
trc41594544
Level 3

Likes

16 likes

Total Posts

43 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
trc41594544
Level 3

Likes

16 likes

Total Posts

43 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
trc41594544
Level 3

10-01-2018

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

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

10-01-2018

I am doing this use case right now to verify if i can reproduce your results on AEM 6.2.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

10-01-2018

I tested on 6.2 and see the LINK in the RTE -

ACNN.png

WHen i close the page and reopen it - the link is still there and renders to the page --

CNN11.png

I am not seeing your issue. Like i said earlier - looks like a bug in your system.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

10-01-2018

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.

Avatar

Avatar
Validate 1
Level 3
trc41594544
Level 3

Likes

16 likes

Total Posts

43 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
trc41594544
Level 3

Likes

16 likes

Total Posts

43 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
trc41594544
Level 3

10-01-2018

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.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

10-01-2018

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-Fi...

Package is updated with output that includes links from a RTE -- as shown here:

Client.png