You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The classes defined for a fragment block (in documents) should be retained when the fragment block is rendered.
All sections defined inside a fragment should be rendered.
Actual Behaviour
The classes defined for the fragment block are not retained.
Only the first section is rendered when multiple sections are defined in the fragment.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Scenario 1: Classes defined for the fragment block are not retained.
Include a fragment in a document and define specific classes for the fragment block.
Add CSS for the defined class.
Preview or publish the page. When the page is rendered, the CSS class is not applied because the class is missing from the HTML DOM.
Scenario 2: Only the first section is rendered when multiple sections are defined in a fragment.
Include a fragment block in a document.
Add a link to another document containing the fragment content.
Define multiple sections within this linked document.
Preview or publish both documents. Only the first section of the fragment content is rendered.
HTML changes
The HTML structure of the fragment block differs from other blocks. Typically, the structure follows: container → wrapper → block. However, for the fragment block, it only includes container → wrapper, omitting the block level.
With this update, classes defined in the referred fragment section, which was previously copied into the fragment block section, will remain in the referred fragment section. Further, all the referred fragment sections will now be copied under the fragment block, ensuring the same HTML DOM standards as other blocks.
Expected Behaviour
Actual Behaviour
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Scenario 1: Classes defined for the fragment block are not retained.
Scenario 2: Only the first section is rendered when multiple sections are defined in a fragment.
HTML changes
The HTML structure of the fragment block differs from other blocks. Typically, the structure follows: container → wrapper → block. However, for the fragment block, it only includes container → wrapper, omitting the block level.
With this update, classes defined in the referred fragment section, which was previously copied into the fragment block section, will remain in the referred fragment section. Further, all the referred fragment sections will now be copied under the fragment block, ensuring the same HTML DOM standards as other blocks.
Platform and Version
Verified with latest bolierplate code.
Sample Code that illustrates the problem
The problem is caused by this code section: https://github.com/adobe/aem-boilerplate/blob/main/blocks/fragment/fragment.js#L49-L52
The text was updated successfully, but these errors were encountered: