Nintex Web Part Maintenance Page error

When applying a custom master page to our SharePoint site, we struck an issue with opening Nintex forms.

Sorry, something went wrong

An unexpected error has occurred.

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.

 

After a bit of digging around with ULSviewer, we found this error in the SharePoint Log

Application error when access /site/Lists/ourlist/DispForm.aspx, Error=The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

at System.Web.UI.ControlCollection.Add(Control child) 

at Nintex.Workflow.Forms.ControlTemplates.ListForm.OnInit(EventArgs e) 

at System.Web.UI.Control.InitRecursive(Control namingContainer) 

at System.Web.UI.Control.InitRecursive(Control namingContainer) 

at System.Web.UI.Control.AddedControl(Control control, Int32 index) 

at Microsoft.SharePoint.WebPartPages.ListFormWebPart.CreateChildControls() 

at System.Web.UI.Control.EnsureChildControls() 

at Microsoft.SharePoint.WebPartPages.WebPart.get_WebPartMenu() 

at Microsoft.SharePoint.WebPartPages.ListFormWebPart.CreateWebPartMenu() 

at Microsoft.SharePoint.WebPartPages.ListFormWebPart.OnLoad(EventArgs e) 

at System.Web.UI.Control.LoadRecursive() 

at System.Web.UI.Control.LoadRecursive() 

at System.Web.UI.Control.LoadRecursive() 

at System.Web.UI.Control.LoadRecursive() 

at System.Web.UI.Control.LoadRecursive() 

at System.Web.UI.Control.LoadRecursive() 

at System.Web.UI.Control.LoadRecursive() 

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

The problem was definitely master page related, because it didn’t occur when we switched back to the default SharePoint master page.

The solution:

In the custom master page, look for the following code.

Move this code block from the Header in to the Body of the master page

<!–MS:<SharePoint:AjaxDelta id=”DeltaSPWebPartManager” runat=”server”>–>
<!–MS:<WebPartPages:SPWebPartManager runat=”server”>–>
<!–ME:</WebPartPages:SPWebPartManager>–>
<!–ME:</SharePoint:AjaxDelta>–>

Try opening the Nintex form again and with any luck your error will go away.

I believe this issue happens because Nintex forms ignore the header part of the master page. Someone with more developer knowledge than me might be able to explain further.

[Updated]

The HTML master page SPWebPartManager position can also be part of the problem. Make sure this is positioned in the <body> section too. I noticed that if this was in the wrong place, it could cause the error above for all users except Site Collection Admins.

See the reference section of this MSDN article for an example of correctly format HTML

How to: Convert an HTML file into a master page in SharePoint 2013

 

SharePoint Blog Comments Alert

I was asked recently how to setup an alert on a SharePoint blog so that the author of the blog would be notified when someone made a comment. Here is the solution, built with a SharePoint Designer workflow.

Before we begin, I’ll give a quick explanation of how the SharePoint blog is structured. SharePoint uses two lists to implement blogs and comments.

  • Posts contains the blog post with details including the blog post text, author, date, number of comments and number of likes
  • Comments contains the comment and is linked back to the Posts list via a lookup column

Building the workflow:

In SharePoint Designer, create a new Workflow on the Comments list in the blog site. Configure the blog flow to run when a new item is created.

  1. Create a workflow variable to store the Created By column of the Blog post associated with the comment. This is done using a lookup field.

Screen Shot 2015-11-28 at 6.17.34 pm.png

2. Create an email using the variable created in step 1 in the “To” field of the Workflow email template. You can also enter the name of the Blog post.

Screen Shot 2015-11-28 at 6.21.08 pm.png

That’s it! Now anytime someone makes a comment on the blog, the author of the blog will receive an email notification.

This solution will work for SharePoint 2010, 2013 and SharePoint Online.

 

Migrating the SharePoint Content Type Hub

Microsoft Introduced the Content Type Hub (CTH) in SharePoint 2010.  It allows the central management of Content Types access multiple Site Collections. Content Types are defined and configured in the CTH and published to other site collections.

I have recently migrated several SharePoint 2010 environments with Content Type Hubs to SharePoint 2013. The documentation on how to do this is a bit patchy hence this post.

Migrating the Content Type Hub

The Content Type Hub is dependent on the Managed Metadata Service.

  1. Restore the Managed Metadata database and Content Type Hub content databases to the SQL Server used by your SharePoint 2013 farm.
  1. Create a site collection for the Content Type Hub using the database restored in step 1.
  1. Use the following PowerShell script to create a new Managed Metadata Service. Replace the database name with the name of the database restored in step 1.
$applicationPool = Get-SPServiceApplicationPool -Identity "Managed Metadata Service Application"
$mms = New-SPMetadataServiceApplication -Name "Managed Metadata Service
Application" -ApplicationPool $applicationPool -DatabaseName "SP_MMDS_Database"
New-SPMetadataServiceApplicationProxy -Name " Managed Metadata Proxy" -ServiceApplication $mms -DefaultProxyGroup
  1. If the URL of your SharePoint 2013 web application is different to SharePoint 2010 you will need to update the URL in the Properties of the Managed Metadata Service Application using this PowerShell.
Set-SPMetadataServiceApplication –Identity “Managed Metadata Service Application” –HubURI http://yoursharepointsite/CTH

This will update the URL in the Properties page. Note that doing this will make all Content Types “unpublished” and you will need to republish them.

More tips:

The SharePoint Timer Jobs used to publish Content Types will have the default settings. If you want to publish / synchronise more frequently you should change these settings in Central Admin \ Monitoring \ Job Definitions. Look at the settings on these jobs:

  • Content Type Hub
  • Content Type Subscriber

Test publishing by going to the Content Type Hub and republishing a Content Type. If you get an error ‘No valid proxy can be found to do this operation- publishing of content type‘, check the URL of the CTH in the Managed Metadata Service properties.

Launching Stratos Technology Partners

CBStoStratos

Four years ago I launched Canterbury Business Solutions with two business partners. It’s fair to say that we launched in a rush and really didn’t have much of a plan. We just wanted to help out clients of our former employer. We wanted to do the right thing.

We grew our business, learning many lessons along the way, some good and some hard. We kept moving ourselves forward in a sort of zig-zaggy way gaining experience and having plenty of fun doing it our own way.

the only constant is change

As our business has grown and us with it, one thing is true. We needed a new name to take away barriers (some real and some perceived). We needed a strategy and we needed a vision. We sat down early in 2014 and started to think, about ourselves. What did we want out of this? Up until this point, we really had focused on our clients and that’s cool, but what about us?

A few months raced by and our vision started to become clear. We wanted to know what our clients wanted us to be. We asked them and right there was the answer to our first question. We wanted to feel like we add value to our clients, we don’t want to be just another contractor or vendor, we want to be an extension of them.

We started working on what that meant to us and to our clients. It has been a long process but I think we have uncovered our DNA and a bit of our clients DNA too. This has become the core of our values and strategy.

So, with that I say farewell to Canterbury Business Solutions and hello to Stratos Technology Partners (Stratos for short).

To find out a bit more, visit our new website here:  www.stp.co.nz.