Care should be taken while rendering slots, if you are not using the OOB macros

As noted earlier, the slot, snippet and field objects in assembly are enclosed in certain div tags to make them accessible in AA. Out of the box slot, field macros add appropriate tags. If you are looping through the slot results and rendering on your own, you have to add the start and end macros for slots and snippets.

Here is an example of bad code.

#initslot(“myslot” “”)##
#startAASlot(“myslot”)
#if($sys.currentslot.relresults.size() > 0)##
#foreach( $relresult in $sys.currentslot.relresults )##
#if(‘Some Logic Here’)
<div class=“some div class”>$rx.doc.extractBody($relresult).trim()</div>##
#else
$rx.doc.extractBody($relresult).trim()##
#end
#end##
#end##
#endAASlot()
#endslot(“myslot”)##

The client rendering uses the start and end macros of slot but it is missing the macros for snippet.

This can be fixed either by replacing
$rx.doc.extractBody($relresult).trim()##
with
#slotItem($relresult)##

or adding the start and end snippet macros around
$rx.doc.extractBody($relresult).trim()##