Support Article
Open window error on opening a window from menu
SA-9854
Summary
Below message on UI is observed while trying to access a window from menu:
Open window error : 'cafescript' is undefined
This issue is reported only on IE11.
Error Messages
Open window error : 'cafescript' is undefined
Steps to Reproduce
1. Login as ccagent.
2. Open any mdi window using offerings.
3. The window opens successfully for the first time (positive case).
4. On accessing the same window again, the reported issue is observed(negative case).
5. However, the issue is resolved on accessing the window again and again.
NOTE : The reported issue is not replicable OOTB.
Root Cause
In desktop.js – extractApplicationMenuConfig(), for the below code:
var udmConfig = cafescript.createConfigFromXMLString(document.getElementById('unifiedDesktopMenus').innerText);
1. cafescript was undefined.
2. document.getElementById('unifiedDesktopMenus') was null,
for the negative scenario.
Resolution
Below changes in desktop.js – extractApplicationMenuConfig() fixed the reported issue :
//Code change starts
if(null != document.getElementById('unifiedDesktopMenus')){
var cafescript = top.advisorDesktop.cafescript;
var udmConfig = cafescript.createConfigFromXMLString(document.getElementById('unifiedDesktopMenus').innerText);
udmConfig.traverse(findMenuConfigByLanguage, foundMenu);
}
//Code change ends
wherein ,
1. cafescript object was created explicitly.
2. A null check was placed for document.getElementById('unifiedDesktopMenus').
Published June 3, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.