Patch B-01384 breaks node_slot calls (7.2)

We needed to apply the B-01384 patch to 7.2 fix Editlive and allow update to Java 7.0.45 so that checkboxtrees would also work.

Applying the patch causes node_slot calls to fail in navon snippet templates, eg:

[I][B]Problem assembling output for item (name=“Letter L Navon”, id=7-101-983) with template: dtSnNavHeader. "

Problem assembling output for item (name=“Letter L Navon”, id=7-101-983) with template: dtSnNavHeader. : Invocation of method ‘assemble’ in class com.percussion.services.assembly.jexl.PSAssemblerUtils threw exception com.percussion.services.assembly.PSAssemblyException: The id 38,916,698,669,776 does not match the sys_contentid parameter 983. at sys_assembly.vm[line 134, column 50][/B][/I]

Uninstalling the patch causes these slots to work again perfectly.

Not the massive erroneous ID which doesn’t match (anything in the whole system, ever) - 38,916,698,669,776

Immediate ideas would be gratefully received!!

Just to confirm, here is what my node_slot looks like OOB 7.2 with Patch, does your copy match?:

#macro(node_slot $node $slotname $header $before $after $footer $params)##
#__slotsetup($slotname $params)##
#set($cloneditem = $sys.assemblyItem.clone())##
$cloneditem.setNode($node)##
#set($sys.currentslot.relresults = $rx.asmhelper.assemble($cloneditem,$sys.currentslot.slot,$completeparams))##
#if($sys.currentslot.relresults.size() > 0)##
$header##
#foreach( $relresult in $sys.currentslot.relresults )##
$before##
#set($body = "$rx.doc.extractBody($relresult)")##
$body##
$after##
#end##
$footer##
#end##
#end

[QUOTE=allana;21043]We needed to apply the B-01384 patch to 7.2 fix Editlive and allow update to Java 7.0.45 so that checkboxtrees would also work.

Applying the patch causes node_slot calls to fail in navon snippet templates, eg:

[I][B]Problem assembling output for item (name=“Letter L Navon”, id=7-101-983) with template: dtSnNavHeader. "

Problem assembling output for item (name=“Letter L Navon”, id=7-101-983) with template: dtSnNavHeader. : Invocation of method ‘assemble’ in class com.percussion.services.assembly.jexl.PSAssemblerUtils threw exception com.percussion.services.assembly.PSAssemblyException: The id 38,916,698,669,776 does not match the sys_contentid parameter 983. at sys_assembly.vm[line 134, column 50][/B][/I]

Uninstalling the patch causes these slots to work again perfectly.

Not the massive erroneous ID which doesn’t match (anything in the whole system, ever) - 38,916,698,669,776

Immediate ideas would be gratefully received!![/QUOTE]

Yes, exactly the same. No modifications to our node_slot macro, or any other in the system vm file.

There is a note in the 7.3 patch read me that indicates that the following change to the imghelp macro needs to be made manually. I have asked if this was intentional or if it was accidentally left out of the 7.2 patch readme. In the mean time, you could try to apply this change and see if it corrects the issue.

I suspect that it is something further up the chain in your templates from node_slot that is causing an array of Id’s to be passed in, instead of a single ID. Also am wondering if the change to rx.location.generate that required that this macro be changed could affect other templates that were using the older signature. Here is the section from the read me:

Modify User Velocity Macros
An old form of $rx.location.generate used in imghelp macro which comes with the Fast Forward User Velocity macros file does
not handle items in multiple folders well. To make use of the folder and site fixup here, you should change this to pass
$sys.assemblyItem as a parameter. This allows the function to accesse the original site and folderid of the page in caluclating
the correct folder and site for the passed in node. Some of the other parameters on this method are no longer required as the
values can be obtained from the $sys.assemblyItem.

             This should be changed elswhere in the template code it is also used with these same parameters.
  
  Change the following line in User Velocity Macros:
  [B]#macro(imghelp $image $template)$rx.location.generate($template, $image, $rx.location.folderPath($image),$sys.assemblyItem.getFilter().getName(), $sys.assemblyItem.getSiteId().longValue(), $tools.number.toNumber($tools.list.get($sys.params.get('sys_context'), 0)) )#end[/B]
  to:
  [B]#macro(imghelp $image $template)$rx.location.generate($sys.assemblyItem, $template, $image)#end[/B]

I’m afraid that made no difference.

Also confused about what that list of IDs is since it doesn’t consist of content items in our system, or if it’s actually a big number…

A

Ok. It looks like the node_slot macro on 7.2 with the patch has an issue stemming from the new way that Site and Folder locations are calculated. Try replacing your node_slot macro with the following slightly modified version below as a work around.

#macro(node_slot $node $slotname $header $before $after $footer $params)##
#__slotsetup($slotname $params)##
#set($cloneditem = $sys.assemblyItem.clone())##
$cloneditem.removeParameter(“sys_folderid”)##
$cloneditem.removeParameter(“sys_contentid”)##

$cloneditem.setNode($node)##
$cloneditem.normalize()##
#set($sys.currentslot.relresults = $rx.asmhelper.assemble($cloneditem,$sys.currentslot.slot,$completeparams))##
#if($sys.currentslot.relresults.size() > 0)##
$header##
#foreach( $relresult in $sys.currentslot.relresults )##
$before##
#set($body = “$rx.doc.extractBody($relresult)”)##
$body##
$after##
#end##
$footer##
#end##
#end

Thanks Nate and everyone – this appears to have done the trick on our dev system so just a verification that it all publishes out ok and we’ll be good to apply to live.

One question – will this code be able to remain after future patches or will we need to revert all the changes back to the original way, ie the reverse of your instruction?

Cheers,

Andrew

Sorry, this is our system that’s being discussed of course. As I read it, a modification to a standard macro is needed. I think Andrew’s question is a good one. Will the modification itself come out as part of a future patch, and if so when? If it’s very short term, it could be better to apply the patch than to make changes ourselves.

Sorry for the delay, the change will be included in a future patch but that could be several weeks away from delivery, so we are recommending that you apply the update to the macro in the mean time.

-n

Hi Nate,

I’m not sure but I think this same patch issue may also be affecting a UDF - sys_casGenerateAssemblerLink - as after the patch we had to change some of our older custom applications to get around this.

By the way this is the patch B-01383 for 7.3 by the way which I assume is pretty similar

You can replicate this quite easily by creating an XML application and using the UDF in the Request mapper.

If you trace the application when attempting the request it just stops at that point.

Might be something you want to look at also.

Cheers,

Bal

How do I make this change? I see the node slot in the snippets drawer, but I don’t see how to modify it. Help, please? I need to implement this fix fast or I am going to have to waste a lot of time rolling the CMS back to a version prior to this patch. Thanks!

Could you please provide snippet source to guide? Additionally I would recommend to submit a support ticket to assist you via gotomeeting call.

Here are the steps to update the node_slot macro.

  1. Start Workbench & connect to server.
  2. From the Window menu - Show View->System Design
  3. Expand the CMS Files Folder
  4. Expand sys_resources->vm
  5. Open the sys_assembly.vm file
  6. Click in the editor and press CTRL-F to bring up the search dialog
  7. Search for node_slot.
  8. Replace the body of the macro with the code above and save the Velocity macro file.

-n