Details
Description
If the script with id 'configuration-script' is found more than once on the same page(which is a common thing in portal-environment), the line:
String viewIDScript = "document.getElementById('configuration-script').parentNode.viewIdentifier=" + context.getViewNumber() + ";\n";
doesn't find the current script hence the view id is incorrectly identified upon submit.
String viewIDScript = "document.getElementById('configuration-script').parentNode.viewIdentifier=" + context.getViewNumber() + ";\n";
doesn't find the current script hence the view id is incorrectly identified upon submit.
The solution for this would be to replace that line from the file DOMResponseWriter.java with:
String viewIDScript = "var scripts=document.getElementsByTagName('script');scripts[scripts.length-1].parentNode.viewIdentifier=" + context.getViewNumber() + ";\n";
which will search for the last script added(which is always the current script) and set the viewIdentifier on it's parent.