Template erroring after site restructure

Hello We are having a problem where a template is erroring at this piece of code

#initslot(“gpSctCrimeMapperXmlList” $folderpath)##
#if($sys.currentslot.relresults.size() > 0)##
<teams>
#foreach( $relresult in $sys.currentslot.relresults )##
$rx.doc.extractBody($relresult)##
#end##
</teams>
#else##
<!-- there are no GPcnt_SCT content items in a public state to include -->
#end
#endslot(“gpSctCrimeMapperXmlList”)

Basically a section of our site got replaced with a new section by copying the new content over the old.

The error that is returned is

Problem during the assembly of item
Click here to view velocity log

Parameters passed
Name Value
sys_contentid 12771
sys_revision 3
sys_folderid 1461
sys_context 0
sys_siteid 325
sys_itemfilter preview
sys_template 880

Error reported
Problem assembling output for item: 3-101-12771 with template: gpPgForceCrimeMapperXml exception: null see log for stack trace

Please note: More information may be available on the console

And there is nothing in the velocity log.

any help guidance much appreciated.

Thanks

Nicholas

It’s highly likely that the slot parameters you’re passing are null… the name of $folderpath also implies that it’s not even query-string formatted. try replacing this with “” or ‘’ (empty strings) and see what happens. Also… unless you’ve removed code from your template, you don’t need that else statement… which means that this entire section of code can be reduced to:

#slot_simple(‘gpSctCrimeMapperXmlList’)

(I prefer using single-quotes unless absolutely necessary for speed of template rendering… but it’s really a matter of taste.)

Hello Rushing,

Thanks for the kind reply,

I have tried the solution that you have documented but unfortunately it still yields the same error message :frowning:

Any other thoughts?

Thanks

Nicholas

Nichloas,

Problem assembling output for item: 3-101-12771 with template: gpPgForceCrimeMapperXml exception: null see log for stack trace

What happens when you preview the Content Item with the ID 12771 using the gpPgForceCrimeMapperXml Template? The error is occurring assembling that Content Item with that Template in the Slot.

RLJII

This also happens when one of the items in the slot has a problem. I would preview each of the items in the slot individually (with the default template / template chosen when inserted in the slot if done manually) and see if any of them have issues…

So, have you checked the console.log file for the stack trace to see what statement is causing the error?