Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.3, EE-3.3.0.GA
-
Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
-
Component/s: Framework
-
Labels:None
-
Environment:Portals
-
Assignee Priority:P2
Description
The problem is the following is logged to the browser's client console (this is from Chrome, other browsers may report it differently):
Uncaught TypeError: Cannot read property 'submit' of null
The error occurs in this function:
namespace.captureSubmit = function(id) {
var f = document.getElementById(id);
f.nativeSubmit = f.submit;
...
The id passed in is non-null but doesn't match anything in the current page. I'm unable to see any functional impact - perhaps because captureSubmit isn't necessary for those hidden forms?
The problem is intermittent and doesn't happen every time but to reproduce I have several different portal pages with multiple portlets. I interact with one or more portlets on a page and then move to a different page. Repeating this eventually shows the issue.
Uncaught TypeError: Cannot read property 'submit' of null
The error occurs in this function:
namespace.captureSubmit = function(id) {
var f = document.getElementById(id);
f.nativeSubmit = f.submit;
...
The id passed in is non-null but doesn't match anything in the current page. I'm unable to see any functional impact - perhaps because captureSubmit isn't necessary for those hidden forms?
The problem is intermittent and doesn't happen every time but to reproduce I have several different portal pages with multiple portlets. I interact with one or more portlets on a page and then move to a different page. Repeating this eventually shows the issue.
Further analysis shows that the captureSubmit is run against each form on the page. Usually the ids match and everything is fine but when the problem occurs, it inevitably can't find our two hidden forms for each portlet. The ids that are being used don't match the ids for each hidden form so it reports the error twice for each portlet. For example:
The values of our hidden form ids on the page at the time are actually:
It seems as if the values in the scripts that do the captureSubmit are old values - but only for the hidden forms.