Highlighted

links to ppt not working on OOB text component

Avatar

Avatar

carolynr5682886

Avatar

carolynr5682886

carolynr5682886

14-01-2019

Hi,

I have a problem with the OOB text component not publishing the links to pps, ppsx or pps assets within the DAM on a page.

Currently when I add a link to the ppt, ppsx or pps assets in the DAM via the text component it does not keep the link to the asset in the DAM and returns an empty <a href> on the page like so:

1668130_pastedImage_0.png

The text component is OOB using sightly on an AEM 6.2 instance.

I've made sure that the ppt, ppsx and pps files have been published, can be accessed through the browser by the DAM link and is not showing as a broken link within the text component on my page. Also I have gone to my instance https://<server_name>/system/console/mimetypes and found the mimetype associated to the ppt, pps and pps.

Example here:

1668266_pastedImage_4.png

1668267_pastedImage_5.png

How can I get the OOB text component to keep the links to the ppt, pps and pps dam assets?

Replies

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

14-01-2019

How are you getting the links - are you using PathFinder from a dialog?

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

14-01-2019

The above component that has links should be an HTL component that has text and a line for links so ppl can click it to download the asset.

Highlighted

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

969

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

969

Correct Answer

1.1K
kautuk_sahni
Community Manager

15-01-2019

I am not very clear with your questions. What do you mean by "adding links to the PPT", is it links to the text? How are you adding these links?

Highlighted

Avatar

Avatar

carolynr5682886

Avatar

carolynr5682886

carolynr5682886

15-01-2019

Yes Scott, I am using the pathfinder to grab the ppt, ppsx or pps assets from the dam to create the link.

link selection..PNG
I am also using the OOB text component that calls this text.js

textjs.PNG

All of the other examples I have on the page using the OOB text component allow the user to download the respective asset from the DAM. The other examples of assets from the DAM are the following: zip, .doc, .docx, .xlsx, .xls, .pptx, pps

Here is an example of the .doc working:

1668832_pastedImage_4.png

Highlighted

Avatar

Avatar

carolynr5682886

Avatar

carolynr5682886

carolynr5682886

15-01-2019

Also please see the text component itself:

1668833_pastedImage_0.png

Highlighted

Avatar

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281
Gaurav-Behl
MVP

15-01-2019

change the context to 'unsafe' from 'html' and test if it works?

"${text.context == 'unsafe'}" rather than "${text.context == 'html'}"

If it works fine with unsafe then it's an issue with XSS/Antisamy policy configurations which you can override appropriately.

Highlighted

Avatar

Avatar

carolynr5682886

Avatar

carolynr5682886

carolynr5682886

15-01-2019

I've changed:  "${text.context == 'unsafe'}" in the component to now be this:

<span style="line-height: 1.6em; font-weight: 300;">

<p data-sly-use.text="text.js" data-sly-unwrap="${text.context == 'unsafe'}" class="${text.cssClass}" data-emptytext="Text">${text.text @ context=text.context}</p>

</span>

However, the links to ppsx and ppt are still empty.

<a>Download Link</a>

Highlighted

Avatar

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281
Gaurav-Behl
MVP

15-01-2019

does this ppt, ppsx have any scripts/embedded objects inside it which could be considered as unsecure by RTE/AEM?

do you see any errors/warnings in error.log file?

Highlighted

Avatar

Avatar

carolynr5682886

Avatar

carolynr5682886

carolynr5682886

15-01-2019

ah! yes.

15.01.2019 09:54:07.155 *INFO* [10.223.42.151 [1547574847149] GET /author/content/NVEnergy/en/test-2/file-test/jcr:content/content/columncontrol/col-cntrl-1/columncontrol_1784891259/col-cntrl-2/text_copy_copy.html HTTP/1.1] org.apache.sling.xss.impl.HtmlToHtmlContentContext AntiSamy warning: The a tag contained an attribute that we could not process. The href attribute had a value of "&#47;content&#47;dam&#47;nvenergy&#47;brochures&#95;arch&#47;test&#45;2&#47;MPB&#95;Sponsor Slide 2&#95;2018&#46;ppt". This value could not be accepted for security reasons. We have chosen to remove this attribute from the tag and leave everything else in place so that we could process the input.

How do I correct/handle this so that the warning does not occur?