-
Bug
-
Resolution: Fixed
-
Major
-
1.4.2
-
None
-
Java 6, Mac OS X 10.6, Safari
-
-
Yes
-
Empty show more show less
When you rename a page which is the target of a redirect you will get a FreeMarker template error (at least in edit mode).
This template fixes the problem:
[#assign cms=JspTaglibs["cms-taglib"]] [@cms.mainBar dialog="stkRedirect" /] <p style="margin-top:40px"> [#if mgnl.editMode && content.path?has_content] [#assign targetContent = mgnl.getContent(content.path)!] [#if targetContent?has_content] [#assign path="${mgnl.createLink(targetContent)!''}"] This page will redirect to <a href="${path}">${path}</a> [#else] The target page (${content.path!}) could not be found. Please fix the redirect. [/#if] [#else] Please define a path where to redirect the request. [/#if] </p>
Even better of course would be a redirect template that would store the UUID of the target page instead of the path!
Acceptance criteria