aem-core-wcm-components icon indicating copy to clipboard operation
aem-core-wcm-components copied to clipboard

[Image V3] Cannot add callable link (href="tel:..." to image v3 component

Open fbonheurCap opened this issue 2 years ago • 4 comments

Bug Report

Current Behavior Add a native image v3 component to a page In the Metadata dialog tab set le Link property to "tel:0000000000" View the page as published The href attribute of the image V3 anchor tag is "tel:?wcmmode=disabled" The following error is visible in the logs

16.10.2023 11:54:32.077 *ERROR* [[0:0:0:0:0:0:0:1] [1697450072065] GET /content/ufrfront/edito/home/jcr:content/root/image.m90429.html HTTP/1.1] com.adobe.cq.wcm.core.components.internal.link.LinkUtil abs_path requested
org.apache.commons.httpclient.URIException: abs_path requested
	at org.apache.commons.httpclient.URI.<init>(URI.java:326) [com.day.commons.osgi.wrapper.commons-httpclient:3.1.0.28]
	at com.adobe.cq.wcm.core.components.internal.link.LinkUtil.escape(LinkUtil.java:89) [com.adobe.cq.core.wcm.components.core:2.23.0]
	at com.adobe.cq.wcm.core.components.internal.link.DefaultPathProcessor.sanitize(DefaultPathProcessor.java:141) [com.adobe.cq.core.wcm.components.core:2.23.0]
	at com.adobe.cq.wcm.core.components.internal.link.LinkBuilderImpl.lambda$buildLink$1(LinkBuilderImpl.java:169) [com.adobe.cq.core.wcm.components.core:2.23.0]
	at java.base/java.util.Optional.map(Optional.java:265)
	at com.adobe.cq.wcm.core.components.internal.link.LinkBuilderImpl.buildLink(LinkBuilderImpl.java:168) [com.adobe.cq.core.wcm.components.core:2.23.0]
	at com.adobe.cq.wcm.core.components.internal.link.LinkBuilderImpl.build(LinkBuilderImpl.java:149) [com.adobe.cq.core.wcm.components.core:2.23.0]
	at com.adobe.cq.wcm.core.components.internal.models.v1.ImageImpl.initModel(ImageImpl.java:302) [com.adobe.cq.core.wcm.components.core:2.23.0]
	at com.adobe.cq.wcm.core.components.internal.models.v2.ImageImpl.initModel(ImageImpl.java:153) [com.adobe.cq.core.wcm.components.core:2.23.0]
	at com.adobe.cq.wcm.core.components.internal.models.v3.ImageImpl.initModel(ImageImpl.java:92) [com.adobe.cq.core.wcm.components.core:2.23.0]
	at jdk.internal.reflect.GeneratedMethodAccessor257.invoke(Unknown Source)

Expected behavior/code The href attribute of the image V3 anchor tag is "tel:0000000000?wcmmode=disabled"

Environment

  • AEM version : AEM SDK 2023.9.13665.20230927T063259Z
  • Core Components version : 2.23.0
  • JRE version : 11 (AEMaaCS)

Possible Solution

Additional context / Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.

fbonheurCap avatar Oct 16 '23 10:10 fbonheurCap

We also experience something similar when a mailto:[email protected] link is used in the Image. The mailto works on publisher. It seems like the Teaser is also affected https://github.com/adobe/aem-core-wcm-components/issues/2636

ghost avatar Dec 14 '23 07:12 ghost

The same issue occurs with core/wcm/components/button/v2/button. The link set as tel:0800600600 works, but the error logs get flooded with this error. This makes it hard to navigate through Cloud instances error logs. The issue is in LinkUtil, any component using it have the issue.

jtneves avatar Jan 19 '24 23:01 jtneves

Any update about this issue ?

fbonheurCap avatar Jul 26 '24 09:07 fbonheurCap

This should be fixed globaly in LinkUtil, as mailto: or tel: are valid inputs for href attribute. It doesn't matter if it's a teaser, button or anything else.

What is the reason to block it? image

fahol-coop avatar Sep 11 '24 10:09 fahol-coop

After our latest update of the core components to version 2.29.0, the issue is no longer there. We finally unmuted the logging of LinkUtil class. I guess the issue can be closed @fbonheurCap

jtneves avatar Oct 17 '25 12:10 jtneves