Support Article
Script error from pega_ui_doc.js as HARNESS_CONTENT is null
SA-6706
Summary
User is seeing undefined or null reference Javascript error on one of their portal.
Error Messages
Line: 5
Error: Unable to get property 'scrollHeight' of undefined or null reference
Steps to Reproduce
OnLoad of a stream rule. Error: Unable to get property 'scrollHeight' of undefined or null reference is firing up.
Root Cause
We have found the respective code from where the error is originating.
var hcDivScrollHeight = document.getElementById("HARNESS_CONTENT").scrollHeight;
It is present in pega_ui_doc that is a java script file used by the harness document.
Text File: pega_ui_doc(Final)
webwb • pega_ui_doc • js
Pega-UIEngine:07-10-13
There were two places in the Javascript where we are accessing HARNESS_CONTENT and at one of the place, null check was missing.
Resolution
To resolve this issue, we have to modify resizeActionIFrame API in pega_ui_doc to use hcDiv (that already has a null check) instead of using document.getElementById("HARNESS_CONTENT") again in the same function.
This issue will be resolved in the next Pega7.1 release (ML8).
Published January 31, 2016 - 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.