The solution to Custom JavaScript not executing after updating to Portal 9.0.6.7 is simpler than you think

We ran into a problem after updating to Microsoft Portal 9.0.6.7 and had to do some digging around to find the root cause. We captured our learnings and are sharing them here for anyone who runs into a similar issue.

The day after updating to Microsoft Portal 9.0.6.7, we noticed the functionality on some of our pages was no longer working.

For example, this page had some simple HTML code with a couple of options and a Submit button:

This page worked prior to the portal update:

After the update, the custom JavaScript was not executing, and a new error showed up:

Root Cause 

After doing some investigation, we found the issue was something that is easily overlooked when designing pages or coding. A CSS class!

The “submit-btn” CSS class is something a developer may have used or copied over from an existing page to use for the Continue button, and it turned out to be the root cause of the problem.

Submit-btn is an Adx-Studio CSS class that is used on Web Forms and Entity Forms. It seems that Microsoft’s recent update now checks for these classes and looks to append some extra functionality. When it failed to find a Web Form and other objects, the JavaScript threw an error halting the execution of any other custom code on the page.

Best Practice

Moving forward, we suggest removing this CSS and any CSS class you are not using.