When a static list contains an external link and the "Display as teaser" option is toggled on, the Teaser tile for the external link displays the description of the current page, which is unexpected (it should instead be empty).
The reason this is happening is there is a fallback in com.adobe.cq.wcm.core.components.internal.models.v2.TeaserImpl#getDescription to use the current page if no target page can be discerned. However, getTargetPage() already has a fallback to current page for cases where the Teaser has not declared a linkURL. Since getTargetPage() only returns null when linkURL is specified AND it doesnt point to a valid page, it would be better for getDescription() to return null as well in this case since the linkURL is referencing something that is not the current page.
Obviously, the external link list currently doesn't support displaying teaser because there is no way to insert an image for the fixed list items! Wish that testing was done before they released it.
Bug present as of version: 2.24.7-SNAPSHOT
When a static list contains an external link and the "Display as teaser" option is toggled on, the Teaser tile for the external link displays the description of the current page, which is unexpected (it should instead be empty).
The reason this is happening is there is a fallback in
com.adobe.cq.wcm.core.components.internal.models.v2.TeaserImpl#getDescription
to use the current page if no target page can be discerned. However,getTargetPage()
already has a fallback to current page for cases where the Teaser has not declared alinkURL
. SincegetTargetPage()
only returns null whenlinkURL
is specified AND it doesnt point to a valid page, it would be better forgetDescription()
to return null as well in this case since thelinkURL
is referencing something that is not the current page.