LEGACY CONTENT
This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Introduction

The K2 Events Integration site requires that the logged on user have Farm Admin rights to make changes. When the user does not have these rights, the following error is received:
Object reference not set to an instance of an object. at SourceCode.SharePoint.Administration.K2SPContext.get_AdminSiteURL()
at SourceCode.SharePoint.Administration.K2SPContext.InitializeContext()
at SourceCode.SharePoint.Administration.Pages.K2WorkflowFeatures..ctor()
at ASP._layouts_k2_k2workflowfeatures_ascx..ctor()
at ASP._layouts_k2manageworkflowfeatures_aspx.__BuildControlK2UserControl1()
at ASP._layouts_k2manageworkflowfeatures_aspx.__BuildControlContent5(Control __ctrl)
at ASP._layouts_application_master.__BuildControlPlaceHolderMain()
at ASP._layouts_application_master.__BuildControl__control15()
at ASP._layouts_application_master.__BuildControl__control2()
at ASP._layouts_application_master.__BuildControlTree(_layouts_application_master __ctrl)
at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)
at System.Web.UI.Page.get_Master()
at System.Web.UI.Page.ApplyMasterPage()
at System.Web.UI.Page.PerformPreInit()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Error Scenario

Note:  The circumstances described in this article are one scenario under which this issue may, or is known to occur. The description is intended to be specific to the scenario described and does not take into account all possible scenarios or circumstances.

On the Site Settings page in SharePoint the "K2 Events Integration" link only functions when a user with SharePoint Farm Administrator rights clicks the link.

Note: Normally, Site Collection Administrator is what is required for the logged on user

Steps to Reproduce

Configure SharePoint

From Central Administration in K2 for SharePoint Tab, activate K2 Workflow Integration.

K2 Designer for Visual Studio

Create the following process from K2 Designer for Visual Studio:

  1. Create a new Workflow process
  2. Add a SharePoint Events process
  3. Add SharePoint site URL, Choose \ Add Outcome list
  4. In Events selection choose at least 1, and click Finish
  5. Add Server Event
  6. Deploy the process
  7. Once deployed, log in as a user that does not have Farm Administrator and who only has Site Collection Administrator rights
  8. Go to Site Settings > K2 Events Integration
  9. Choose Configure and the error will appear

Error Messages

The following error message applies to this article:

  • Object reference not set to an instance of an object.

Error Resolution

This Hotfix is contained within the latest K2 blackpearl 0807 Update. Install the update package to resolve the error.

The latest K2 blackpearl 0807 Update is available as an independent installation package which can be found here: http://portal.k2.com/downloads/bp/default.aspx