adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
723 stars 737 forks source link

Page List shown as Teasers repeats HTML ID on list items #2760

Open HitmanInWis opened 1 month ago

HitmanInWis commented 1 month ago

Bug present as of version: 2.24.7-SNAPSHOT

When the List component is rendered as Teaser resources, all items referencing internal AEM pages are rendered with the same ID as specified on the parent List component.

This can be fixed by updating com.adobe.cq.wcm.core.components.internal.models.v2.PageListItemImpl#getTeaserResource to include the following line:

                overriddenProperties.put(PN_ID, getId());

For consistency, the same should be done in com.adobe.cq.wcm.core.components.internal.models.v4.ExternalLinkListItemImpl#getTeaserResource