Troubleshooting: Internet Explorer Error: 'pega.ui.WUtils' is null or not an object’ when viewing Operator Profile on a portal
When application users click View Profile in their Work User portals, their Operator Profile windows do not display. The Microsoft Internet Explorer Error on Page
warning is displayed at the bottom left of the users' browser windows in addition to the following message:
Line: 5
Char: 2
Error: 'pega.ui.WUtils' is null or not an object
Code: 0
URL: http://10.101.68.84:9102/prweb/Login/QGTvfy20nT9AU2nGvtsl0rqoVajynLVD*/!STANDARD?pyStream=NavigationPane&pzPrimaryPageName=pyPortal&ShowBranding
If you define a portal rule, verify that you have added the Operator Profile gadget to the Work tab and loaded the JavaScript library pega.ui.WUtils. This library contains the Rule-HTML-Fragment ProfileGadgetInclude, which is required for the display of the Operator Profile.
Example
If you or another developer defines a portal rule that does not include the Operator Profile gadget from the Work tab, when an application user logs in to his or her Work User portal and clicks his or her name to view the Operator Profile, the browser error occurs.
Investigation indicates that the Rule-HTML-Fragment loggonareauser specifies the use of the pega.ui.WUtils library, but the rule omits the INCLUDE statement that loads the library. The JavaScript that needs to be loaded is Rule-HTML-Fragment ProfileGadgetInclude. When the JavaScript is loaded correctly, you can see a statement similar to the following example in the HTML source of the Operator Profile window:
<!-- Begin GadgetInclude -->
<script> var bLaunch = false; if (!pega) var pega = {}; if (!pega.desktop)
{ pega.desktop = {};
pega.d = pega.desktop; } pega.d.pyUID = "[email protected]";
pega.d.pxReqURI = "/prweb/PRServlet/V2tLBzdlCH_1_GE2t0nu1tx1S4Hejwl2*/!Developer";
pega.d.pxHelpURI = "http://WCARBMXP:8080/prhelp";
var requestHomeURI = "http://localhost:8080/prweb/PRServlet/V2tLBzdlCH_1_GE2t0nu1tx1S4Hejwl2*";
pega.d.currAG ="Home:Administrators"; pega.d.isPortlet = false; pega.d.desktopType = "Developer";
var bEncryptURLs = false; </script>
<script type="text/javascript" src="https://docs-previous.pega.com/webwb/pega_desktop_domainsuffix_1819019784.js%21clientlogbase_11632504602.js%21pega_yui_13407090632%21desktopwrapper_13032749599%21hookkeydownevent_12976761236.js%21developerwrapperapi_11879828306.js%21pega_desktop_mouseevent_13941648981.js%21%21.js"></script>
<input type="hidden" name="pxCurrentWorkPool" value="InsCorp-FW-PA-Work">
<script type="text/javascript" src="https://docs-previous.pega.com/webwb/gadgetscript_1297987800.js%21%21.js"></script>
<!-- end GadgetInclude -->
Suggested approach
- Define a new portal rule.
- Be certain to include the Operator Profile gadget with the required JavaScript library, pega.ui.WUtils that contains the Rule-HTML-Fragment ProfileGadgetInclude, which is required for the display of the Operator Profile.
- Implement this new portal rule in an Access Group.
- Assign a Test Access Group to an Operator ID rule.
- Log in with the Test Operator ID.
- Click the user name in the portal banner to view the Operator Profile. The Operator Profile window should open.