Archive for July, 2013

22
Jul
13

KB2844286 on SharePoint 2010 Breaks Web Parts

 

Came in to our project management site only to find several pages with data views (DVWP) throwing an error.

image

The logs have an error for each web part.

07/22/2013 10:20:26.95    w3wp.exe (0x2634)    0x2730    SharePoint Foundation    Web Parts    89a1    High    Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.     at System.Xml.Xsl.XslCompiledTransform.Load(MethodInfo executeMethod, Byte[] queryData, Type[] earlyBoundTypes)     at Microsoft.Xslt.STransform.GetCompiledTransform()     at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)    3b2167ff-b5ed-4e4d-9797-87f715418136

Some googling turned up several articles about KB2844286 and SharePoint 2010.

http://techchucker.wordpress.com/2013/07/16/issue-kb2844286-security-update-on-sharepoint-2010/

http://social.msdn.microsoft.com/Forums/wpapps/en-US/871a0661-05d0-4f3a-b66d-2504552142bd/error-while-executing-web-part-systemnullreferenceexception-object-reference-not-set-to-an

http://social.technet.microsoft.com/Forums/sharepoint/en-US/6f5e2e94-e756-436f-af8e-68b5ca8a9290/error-while-executing-web-part-systeminvalidprogramexception-common-language-runtime-detected-an

http://sharepointeric.blogspot.com/2013/07/kb2844286-security-update-on-sharepoint.html

We are currently checking this out to see if it really fixes our issue…

…and the answer is "YES!"

10
Jul
13

InfoPath 2010 Form: Redirect to your source Page once form has been closed

I’ve noticed that this topic has been asked about by many people and I thought I’d offer up what I did to eliminate this problem.

For those not familiar with this issue, when you create an InfoPath form and create Submit and Cancel buttons, it is likely you want the Cancel operation to redirect or return you to your originating page.  Some folks want to display a "Thank you" page after a submit and then return to their originating page.  While you can do this with scripting, such as JavaScript found here, I think I have a simpler method that doesn’t require you write any custom JavaScript (although it does use a built-in SharePoint JavaScript function).

The trick I used was to open the form in a dialog.  That way, when you click Cancel, the dialog is dismissed and you remain on the same page from which you opened the dialog.

Here’s some example html.

<a href="javascript:OpenPopUpPage(‘uploadfile.aspx?ProjectID={@PMO_x0020_Project_x0020_ID}’, RefreshPage);">

In this case, uploadfile.aspx is located in the pages library and is a custom page with an InfoPath form web part on it.  The custom page also has a URL filter on it that is connected to the form.  The parameter, ProjectID, is a URL parameter that is passed to the form through a web part connection.

Here is an image that has the above hyperlink (Upload File) anchored to it.

image

This opens the page below in a dialog.  Notice how the Project ID is defaulted on the form using a URL parameter that is sent to the form web part using a web part connection.

image

When Cancel is clicked, the dialog is dismissed and we’re right back where we started.

For the "Thank you" page, I’d recommend creating another view in InfoPath and simply switching views after the submit with your "thank you" text and provide an OK button to close the form.




Asif Rehmani’s SharePoint Videos

SharePoint-Videos

Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home

Categories

Posts by Date

July 2013
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
Support Wikipedia