Check for corrupted templates before publication

As we have discovered to our cost, it’s relatively easy to use templates in ways that cause them to publish improperly. We have seen templates that work except that the link is not converted from the internal Rhythmyx to the public URL (so you get published links http://rhythmyx.oursite.com:xxxx/… instead of http://www.oursite.com/…). We have also, in the past, had templates that were mangled rather more thoroughly than this*.

Since it is obviously undesirable to publish such pages, and the problem is relatively easy to detect for the system but almost impossible for business users before publication, I’d like to see Rhythmyx flag such pages. It would be possible to throw an error on Update, on Workflow or on Publish. Of these, my favourite is on Workflow; a business user should be able to save a page in order to seek technical support in resolving the problem, and in any case sometimes the problem does not emerge until after the page is processed in an Update. Errors on publication are too late of course. However, I recognise that this would mean assembling the page in Workflow stages; since the page is assembled for publication anyway, it may be more practicable to make the check then.

Detection is easy; just look for the string http://rhythmyx… in a published context (obviously this should be adjusted according to the domain used for an individual Rhythmyx installation, but we use both public and private domains to access the same server, so would not want to specify the whole URL).

*For completeness, we have had this happen when templates were used in ways slightly different from our design intention. For example, we have some templates that use <SPAN> rather than <DIV>; using these in lists can result in the concatenated templates becoming merged so that Rhythmyx does not fully interpret them.