Saturday, July 3, 2010

Blank InfoPath Form in SharePoint 2010?

After minor changes of a built-in InfoPath form (NewForm.aspx) on a test server, the form was gone!

This was weired. I did similar changes many times before. After some googling, I got the post List form from Infopath 2010 is blank (By Peter Munch Nielsen). It sounds exactly like my case. So I checked it through PowerShell script. However, the status is false on both my development server and the test server, and the form works well on my development server!

Occasionally, I noticed there was a warning message at the left-bottom corner of my IE browser:

When double-clicked it, the error message box popped up:

Emmmm, this didn't happen on my development server.  And I got the same problem on several pages on the test server, so, it seems something wrong in the master page. The error message "Object required" and "'document.getElementById(...)' is null or not an object" are too general, I guess it would be quite hard to troubleshoot that.

After resetting the master page, the InfoPath form appeared again. Nice. It turns out another developer accidently added some invalid JavaScript reference into the master page......

We all know SharePoint 2010 relies heavily on JavaScript. So, when some error stops it, even built-in functionality may stop work.  Since the new feature "Ribbon" is implemented through complex JavaScript, I guess this problem will be quite hard to avoid.

No comments:

Post a Comment