CMS 10.6.492: DITA Aliases Fail to Regenerate If OnNew Custom Hook Contains Element Modification Functions
DITA alias creation or updates may fail to regenerate and may be removed from the Site Tree if your CMS contains any element modification functions in the OnNew custom hook.
Statement of Issue
Users working with DITA aliases in CMS 10.6.492 may encounter an issue where regeneration of aliases could fail and result in missing aliases in their Site Tree. This situation occurs if the CMS is configured with OnNew CustomHook functions designed to modify page content.
Symptoms
Creating a new Alias or checking-in a DITA Asset that has an Alias created in the site tree may throw an error in the CMS:
DITA Alias Updated Failed. Rolling back change.
Once the error displays, the following issues may occur:
- The CMS does not complete the Alias creation process.
- In the case of editing DITA content with an existing Alias, the previously created Aliases may go missing.
This issue stems from any custom code function in the OnNew custom hook meant to modify pages on creation.
Resolution
An upcoming CMS release will resolve address this issue.
Workaround
For CMS 10.6.492 or above, we recommend to add a conditional check in the OnNew custom hook function to test the page is not an alias before executing any custom hook function that modifies Page content.
The example code snippet below adds a check to ensure the current content item's ID begins with an "x" before executing the function, thereby bypassing any possible editing of Alias items:
/// add condition to test for page xID starting the "x"
if (page.XID.StartsWith("x"))
{
/// function goes here
}
Additional Information
This issue only affects users who work with DITA aliases in their CMS and who also have customized OnNew custom hooks meant for page element tranformation. The code example in the Workaround section acts as a temporary workaround until this issue is addressed in a future release of the CMS.
If you have questions or experience further issues, contact Ingeniux Support.
There are no comments yet.