Open rubnig opened 1 year ago
Another possible solution is to add the teaser list item ID to the overriddenProperties
, this way when the teaser model is constructed it will always think the ID has been set in the properties, and the ID value would be exactly the same as non-teaser list items.
+1
+1
Bug Report
Current Behavior There is a bug introduced by the following change in the List component: https://github.com/adobe/aem-core-wcm-components/pull/2367/files#diff-f363eed59fd2d3cfd770d0754f5d64b704e70b974817849d990df87038a2a0a4R130
This change always uses the List component its own resource, overwrites some properties and then uses it to delegate it to render Teasers.
If a content author enters a manual configured ID in the List component, the teasers in the List will render the same HTML
id
attribute as the one that is entered for the List.Steps to reproduce:
id
attribute which is incorrect HTML (ID's need to be unique)Expected behavior/code The Teaser delegates within the List should have their own unique ID's and not conflict with the ID of the List itself.
Environment
Possible Solution Don't wrap the List resource for rendering Teasers but use another resource like the Page or a Synthetic Resource not containing any of the List properties. As this also causes issues with the policies (we now need to include image policy settings in the List design dialog, see: https://github.com/adobe/aem-core-wcm-components/issues/2458#issuecomment-1544799009