SharePoint 2013: InfoPath client forms may open twice [Oct15CU bug]


After a recent Patch Night one of my customers had pulled in SharePoint updates along with Windows Updates and people started complaining about changed behavior

  1. PDF files no longer immediately open in the browser. Instead the PDF client (Adobe Reader) opens up and provides rich integration with options to check-out and such
  2. InfoPath client forms would open twice; meaning the form opens when clicking the link, but also an extra dialog appears to open the form. Users click this and receive messages about the form already being locked (by themselves!)

Hello little bug

We traced it to core.js (and core.debug.js) having a modified date of “15/09/2015 14:45” where functionality to provide “Acrobat Pro X integration” was introduced.

The function OpenDocWithClient is called in two different locations but the return value is ignored. This makes the page refresh that occurs when clicking the InfoPath form link execute more than desired.

Here’s the original (bugged) and modified (fixed by me) versions:

Original (bugged) core.js image

As you can see I added the “return” keyword for the function call, so the event cancelling can continue to bubble up.

For the minified version (core.js) you’ll have to do some digging but if you look for static strings you can find the function call. I think it was “m()” in my case.

Here ya go

You can download this archive which contains both my original and modified versions. If you modify your environment you have to update all web front ends and users will have to clear the browser cache, but no iisreset is required.

Note that later patches may overwrite the system files again and undo your manual changes.

End credits

This bug is introduced with the October 2015 updates, including the full Cumulative Update package. We escalated the case to Microsoft and they confirmed the issue and our workaround. It will probably remain present in the upcoming Cumulative Updates (November, December, …) because it’s not wide-spread and also the PG needs to fit it in into their schedule.


Links to this post


Friday, 11 Mar 2016 10:22 by Eric
Hi Steven - thanks so much for your work on this. Your fixes worked perfectly until I just installed the March 2016 SharePoint 2013 CU. I went back in and made the necessary changes in Core.js and Core.debug.js, functions m() and OpenDocWithClient() respectively, and we are getting some mixed results. On sites where we've added the jslink to the PDFFIX.js file, if a library is set to open documents in client, we get the expected Check Out & Open, Open, and Cancel dialog. If the library however is set to Open docs in the browser, Adobe Reader XI still opens but displays either "There was an error opening this document. The specified path is invalid." or "There was an error opening this document. Access denied." Oddly, that is only if I click on the filename link itself. If I click on the ellipsis, then click either "Open" or "Edit" (not sure why I see both of these), the PDF opens as expected in Reader with the expected Check Out prompt. Any ideas? For PDF-intensive organizations like ours, this is a real annoyance. Thanks!

Tuesday, 5 Apr 2016 09:12 by Steven Van de Craen
Hi Eric, I don't have a March16CU environment at hand. Best you try to get it to work with the DEBUG version because it's more readable. Once that's done you'll have to find where in the minified js you have to make the same changes. Best you don't rely on function names from older CU's, as they may change during minification.

CAPTCHA Image Validation