Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Problems with Javascript comments in custom pxSessionTimer



Users are using SSO Authentication in their application where browser timeout is set as 60 mins. Before the timeout, users should be acknowledged with a popup alert instead of challenging them with logoff screen.

desktop_restartTimeoutWarningTimer() function defined in the webwb • pega_desktop_AppControllerLite.js file is overridden in pxSessionTimer<NAME> ( Customized version of standard pxSessionTimer section rule). This section rule is included in the User top panel of the portal.

But during time, always the desktop_restartTimeoutWarningTimer() defined in the global context i.e. pega_desktop_AppControllerLite.js is being executed but not the one in customized context i.e. pxSessionTimer<NAME>.

Error Messages


Steps to Reproduce

customize desktop_restartTimeoutWarningTimer() in 7.1.7

Root Cause

The root cause of this problem is a defect in customer application code/rules. 

The custop pxSessionTimer rule defined a dekstop_destartTimeoutWarning() javascript function but contained a line of Javascript code with a "//" comment. The rule had the "omit extra" spaces check box enabled. At runtime the "//" comment was causing problems since it was on the same line as other parts of the javascript code. The override of desktop_restartTimeoutWarningTimer was not getting registered properly by the browser.


This issue is resolved through the following local change.

When adding custom javascript to HTML rules do not use "//" to comment code. Instead use:

/* <Comment> */


Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us