Unable to Submit Catalog items via Service Portal


Description

After upgrading to Paris, catalog submissions from the service portal are stuck when submitting. A console error stating that an element cannot be returned from an undefined object.

Release or Environment

Paris

Cause

Upon researching the console error, it was identified that the document object was undefined inside a function within a custom UI Script that was configured to the service portal theme in a JS Include.

Resolution

The function lost scope to the document object; however, it is still defined outside the function. Therefore defining a variable and setting it to document allows you to use the new variable within the function. For example:


var _doc = document; // line 1 of the script


In this case, '_doc' can now be used within the defined function.