I have a query that works fine in the Query Debugger, but when I try to use it in a template for a slot query I get the following error: " [reference to query] is badly formed for a url query parameter, which must have the form param=value "
The offending portion in the query seems to be: " WHERE rx:sys_title != ‘index’ "
What could possibly cause this, since it does appear to be a valid query?
what is the full query you are trying to use in your autoslot and are you passing it any values in a binding on the template level? Let me know the full setup of what you are trying to do and I will try it here
Here’s my query statement, and how I’m pulling in the slot. The $slottype and $orderby values are defined by the content type fields, and the $pagepath value is defined in the bindings by using “$user.psoFolders.getParentFolderPath($sys.item.guid)”
#set ($slotquery="SELECT * FROM $slottype WHERE jcr:path LIKE '$pagepath' AND rx:sys_title != 'index' $orderby ")
#initslot("pc_st_container_auto" "template=$slottemplate&query=$slotquery&max_results=$limit")
#foreach($result in $sys.currentslot.relresults)
$rx.doc.extractBody($result)
#end
#endslot("pc_st_container_auto")
Everything works fine until I add in this part of it:
Just a shot in the dark here, but I’m not sure that != works for not equal to in JCR queries. In standard SQL, <> is used for not equal to, so you might give that a shot.