Affects Version/s: 7.2.1 CE GA2, 7.2.X, 7.3.5 CE GA6, 7.3.X
Fix Version/s: None
Component/s: Content Display Widgets > Web Content Display widget
Steps to reproduce
- Create structure with text field
- Create template for created structure in previous step
- Set "id" attribute for HTML element (for example <p> element) with <@portlet.namespace /> (template-content.png screenshot)
- Check "Cacheable" checkbox in template (template-content.png screenshot)
- Create Web Content
- On page insert at lease two Web Content Display widgets and set the same Web Content for both
- Open browser Developer Tools and compare <p> elements' ids with used <@portlet.namespace /> - they are the same for two web contents, but should be different. <@portlet.namespace /> should return portlet id same as it is in "portlet" CSS class
Second (and others) Web Content with enabled option "Cacheable" gets portlet namespace from the first Web Content when calling <@portlet.namespace /> in FreeMarker template (cacheable-on.png screenshot). It leads to generating errors in browser that duplicated ID exists. Because of this it's impossible to pass WCAG criteria (with aria-attributes) when identificators are not unique. Issue doesn't occur when "Cacheable" option is disabled - multiple same portlets has correct portlet namespace.
When template has enabled option "Cacheable" multiple inserted same contents on page will have correct own portlet namespace (cacheable-off.png).