We have a number of pages using a generic content type (not the default rffGeneric). A dispatch template has been created to dispatch the content item to one of five templates based on a usage field and the content items position in the folder hierachy.
When the site is published, the generic content items are published with the wrong template.
When the item is previewed it templates are correctly dispatched although we get the following error in the console:
2008-06-09 15:55:59,468 ERROR [PSAssemblyService] Problem extracting URL from landing page snippet
java.lang.RuntimeException: Problem when evaluating expression “$rx.location.generate($sys.assemblyItem);” for variable “$pagelink”: com.percussion.services.assembly.PSAssemblyException: Could not locate the default template for content at path //Sites/lawpack.co.uk/Knowledge/Property/LandlordAndTenancy/Landlord & Tenancy Home with content type 348 because no default template could be found for site id = 0-9-305
If I alter the context id, in the preview url, to either 1 or 301 the templates also appear to be correctly dispatched.
All templates are visible to the site and the dispatch template is set as default in the general tab’s publish section.
We are using Rhythmyx 6.5.2.
For the dispatch template and the five other templates, what are their settings in these areas?
a) Publish when
b) Site tab
a) All the templates are set to default.
b) All are visible to the site.
Ah, I see where you are going with this.
I’ve just set the templates so that only the dispatch template is default, all the others are set to none. Publishing now seems to works.
Thanks for pointer!
This happens because of change in the way we use the “default” template setting between 5.x and 6.x assembly.
In 5.x, “default” meant that the variant was one of the several possible default variants, and that it would be published for a given content item if and only if the content item’s “Default variant” field contained the variant id of the variant.
In 6.x, one of our goals was to get rid of the “default variant” field, as it causes all kinds of messy problems when content is revised. The solution was to add the “dispatch template” support, and we re-used the default setting on the template screen as part of the dispatch template system.
The “default” setting in 6.x means that the template is the one and only default template for the content type. If you have multiple templates that “could be” the default template, you have to create a dispatch template and make the dispatch template the default template. All of the other possible templates must be set to “never”.
You should note also that the Location Scheme when you publish in this scenario is attached to the dispatch template, not the template that you are actually intending to publish.
I hope this helps explain things better.