XSL variant using a Velocity template in a slot

I have an existing XSL variant. It refers to a slot. It can display a snippet that is also an XSL variant, but I can’t get it to display a snippet that is written in Velocity. Ought this to work? :frowning:

The new snippet is written in Velocity partly as it has a hyperlink to another page. With v6.1 I can’t get the sys_casGeneratePubLocation to work for new links (this is with technical support UK-07-07-0084).

I’ve just tried publishing and the link appears on the published page but still doesn’t appear in the preview.

Thanks,

Geoffrey

Looking at the XML, each linkurl in the RelatedContent section refers to sys_siteid=0. Taking the linkurl for the velocity template snippet and putting it into the browser gives the error that:

Unexpected exception while assembling one or more items: com.percussion.services.sitemgr.PSSiteManagerException: Site id, 0, does not exit

If I remove the sys_siteid=0 from the URL the template displays correctly.

Geoffrey

Yes, it’s supposed to work.

Why are you previewing in Site 0? Usually, we create special “preview” menus (in Fast Forward, we have “Enterprise Preview” and “Corporate Preview”. The purpose of these previews is to set the site id correctly.

XSL Variants don’t really care about the site that much, but in the Velocity system, the siteid is very important.

:confused:
When I preview - I right-click on the item (get the preview), click on a link that goes to a different view of the page. This has a URL with “page.html” in it (as in Rx5.7) - I change the “html” to “txt” and can see the XML on screen.

The linkurl for the Velocity snippet is
http://127.0.0.1:9992/Rhythmyx/assembler/render?relateditemid=1841&sys_revision=1&sys_siteid=0&sys_authtype=0&sys_activeitemid=&sys_contentid=1257&sys_variantid=531&sys_command=&sys_originalsiteid=0&sys_folderid=&sys_context=0&sys_assemblylevel=1

There is an old-fashioned XSL-Variant snippet in the same slot that displays correctly and has linkurl as:
http://127.0.0.1:9992/Rhythmyx/kucms_module_cas/snippet_assembler.html?relateditemid=1839&sys_revision=2&sys_siteid=0&sys_authtype=0&sys_activeitemid=&sys_contentid=1239&sys_variantid=387&sys_command=&sys_originalsiteid=0&sys_folderid=&sys_context=0&sys_assemblylevel=1

Sounds as though I have to create that special preview menu entry, only I don’t think I have FF installed. I’ll just have to plough through the documentation.

Geoffrey

In Rx 6.x, instead of changing “.html” to “.txt”, change the word “render” to “debug”.

This will give you the debug view of the assembler, which lists all parameters and bindings, etc.

It does look like you are missing the site info.

I think it’s a good idea for you to install Fast Forward on your development server and then you can “borrow” some parts and pieces for your production server.

Dave

:eek:
OK Dave,

I tried replicating the Preview menu and passing a different sys_siteid parameter - if only Rx were that simple! Must be me that’s simple.

It looks like FF will supply the answer.

Cheers,

Geoffrey

I have a question related to Dave’s answer. In version 6.5.2, when I change the render to debug I get an error “Error loading stylesheet: An XSLT stylesheet load was blocked for security reasons.” (FireFox) when using a legacy xsl variant. Is there another way to view the raw xml that gets passed to the xsl variant?

For XSL variants, you need to use the old-style URL, and change the suffix to “.txt”, just as you did before upgrading.

using /debug/ only works for Velocity Templates.

Oh, ok. Does anyone have an example of that old-style URL? I can’t seem to find one.
Thanks!

Creig,

Here’s an assembly/preview URL from our 5.7 system - in this case, cas_mwSeminarEmail is the name of the application, and page_assembler is the name of the query resource within that application. I changed “page_assembler.html” to “page_assembler.txt” to get the raw XML, instead of the result of the XSL transformation.

http://pandora.mathworks.com:9992/Rhythmyx/cas_mwSeminarEmail/page_assembler.txt?sys_revision=2&sys_authtype=0&sys_contentid=16844&sys_variantid=478&sys_context=0

Hope that helps -
Kathleen

This is great. Thanks, Kathleen.

We’re on 6.5 and use some XSL Variants, so I thought I would be able to get to XML by using the ‘old-style’ URL, but I’m getting an error “An unexpected exception occurred. The reason was: guid may not be null or empty”.

Here is my new-style url:
http://rythdev01:9992/Rhythmyx/assembler/render?sys_revision=1&sys_itemfilter=preview&sys_template=712&sys_contentid=28874&sys_context=0

and old-style url I’m trying:
http://rythdev01:9992/Rhythmyx/casIndexManual/page.txt?sys_revision=1&sys_itemfilter=preview&sys_template=712&sys_contentid=28874&sys_context=0

Any ideas how to resolve this?
Thanks

Igor,

Could you please repost this with the URLs fully spelled out (turn off the “automatically parse links” checkbox).

Also, I think it would better if you did this in a new thread rather than recycling an old one: it’s clearly a different problem than the one that we were discussing back then.

Dave