Friday 30 October 2009

0x81070215 Means Dodgy List

After some more hacking around with a custom list SharePoint gave me this error code: 0x81070215

Basically I’d mangled a list definition while an earlier version of the list still existed. The easy solution in my case (dev) was to simply fire up SharePoint Manager 2007 and use the UI to delete the offending list (stsadm –o forcedeletelist –url http://spsite would have probably done the same thing). In a more serious environment, you’d probably need to redeploy the list bits as they were when the list was created.

Control template "ListForm" does not exist

I have no idea how I caused ListForm not to exist but after some clumsy tinkering with a custom schema.xml file, the main section of NewForm.aspx page was coming up blank and the AllItems.aspx page for all lists in all sites across my dev farm refused to render the normal menu.

The SharePoint log file was telling me:

Control template "ListForm" does not exist

Examining a list’s NewForm.aspx file in SharePoint Designer (which of course makes me feel dirty all over) you’ll note it holds a ListFormWebpart. “Control template” would further point me to the _controltemplates virtual directory—mapped to \12\TEMPLATE\CONTROLTEMPLATES, but this directory doesn’t contain a ListForm.ascx or ListFormWebpart.ascx file.

Thankfully the Application event log entry was more precise:

Load control template file /_controltemplates/DefaultTemplates.ascx failed: The file '/_controltemplates/DefaultTemplates.ascx' does not exist.

A quick check of \12\TEMPLATE\CONTROLTEMPLATES and of course DefaultTemplates.ascx was nowhere to be found. Copy/paste from a functional server and we’re back in business. Now to figure how what caused it to be deleted in the first place…

Wednesday 28 October 2009

Activating a feature containing a content type generated from Andrew Connell's stsadm commands generates 100% CPU load

I've used AC's WCM Custom Commands for STSADM successfully in the past and they're extremely handy. In short, I create my site columns and content types in the SharePoint UI and then run Andrew's GenSiteColumnsXml and GenContentTypesXml to dump the XML required for incorporation in a feature. Today I hit a wee snag when attempting to activate a feature containing fields and content types generated from these commands: the operation wouldn't complete until terminated forcefully and the CPU was meanwhile running at 100% (infinite loop anyone?).

Luckily JoeB came across the same problem in the past and was kind enough to post his fix in the comments on Andrew's blog (although I also noticed another commenter noted the issue in production after implementing JoeB's fix...). Andrew says these commands were built using the 80-20 rule: they'll get you 80% of the way there and you're on for the rest. Fair enough—the commands are extremely handy and I reckon they go well beyond the 80% mark. That said, these are some of the things I fix up after generating the output; I'll list JoeB's fix here too:


This makes updating the feature easier:

  • Add the DisplaceOnUpgrade="TRUE" attribute

I've read these aren't meant to be included explicitly but the documentation, useful as it is, indicates they're optional anyway:

  • Remove the SourceId attribute
  • Remove the StaticName attribute

These can go without any consequence I've noticed:

  • Remove the Version attribute
  • Remove the Required="FALSE" attribute

These seem to come out if you muck around with the fields too much in the UI:

  • Remove the PITarget attribute
  • Remove the PrimaryPITarget attribute
  • Remove the PIAttribute
  • Remove the PrimaryPIAttribute
  • Remove the Aggregation attribute
  • Remove the Node attribute
  • Remove the ContentType field altogether (SharePoint Manager 2007 indicates it's added automatically even if not specified)

Content Types

JoeB's fix to the 100% CPU issue:

  • Add NamespaceURI="" to the XmlDocument element

(Note you may also be able to remove the XmlDocuments node altogether).

Friday 23 October 2009

No SharePoint MVPs in Western Australia

This is an unfortunate situation… there are so many top-notch SharePoint guys (and gals) working proactively in the community and doing great work in WA with major clients. That said, with only five SharePoint MVPs in Australia I’d say we’re under-represented as a country!

You can nominate yourself or someone else here:

Western Australia SharePoint MVPs

Tuesday 20 October 2009

Running ISO Recorder on Windows Server 2008 x64

When trying to copy a DVD to an image using ISO Recorder v3.1 on a Windows Server 2008 x64 machine, the Next and Finish buttons were greyed out despite correctly selecting the From and To locations. As I have to run Nero Express Essentials as an admin (right-click, Run as administrator), I tried setting the ShellExec.exe file below C:\Program Files\Alex Feinman\ISO Recorder to run as admin on the Compatibility tab to accomplish the same thing. When that didn’t work, I found I had to click the Show settings for all users and select Run this program as an administrator on the second Compatibility for all users window.

This doesn't seem to work for all functions; for example, attempting to burn the created ISO to disk fails to populate the Recorder drop down with the local optical drive and I can't complete the operation.

In general I must say ISO Recorder looks like it's going to do the job I want it for quite nicely. I created an image from a DVD by right-clicking on the DVD drive icon in Windows Explorer and it popped an 1.7GB .iso out the other end in a few minutes. I've burned ISOs with Nero in the past but can't seem to find the right settings on the version I'm using currently (I'm lumped with .nrg files). ISO Recorder hits the nail on the head so I'm sticking with it ;-)

Tuesday 13 October 2009

Approval workflows: approval by any approver

Configuring an approval workflow to request approval from a group of approvers and deem the workflow complete after any single person has completed their approval task is trivial but it's not that obvious. I certainly missed it on my first pass through today!

The Assign tasks to radio button options on the workflow customisation page focuses on the parallel versus serial distinction. If you've got multiple people configured as approvers, you're either assigning tasks to everyone in the list or you're assigning tasks sequentially to everyone in the list; in both cases every approver has to complete their task before the workflow is deemed complete.

In the past, we've noticed a behaviour where approving a page doesn't seem to do anything—the page status stubbornly remains as Waiting for approval no matter how many times or how many different ways you attempt to approve the page and the fact that you’re a site collection administrator web application administrator, and farm administrator makes no difference!  (Without email configured on the server and perhaps some SSPs bits in place, as was the situation in our case, no one will ever know additional input is required unless you're checking the workflow status). In all likelihood, the root cause of this "problem" was an approval pending completion by virtue of being assigned to twenty people. Doh!

But I digress. Adding approvers to a dedicated Approvers group is the logical thing to do in most cases to simplify approver management. Instead of changing multiple workflows as employees come and go, it's much easier to manage a SharePoint group or an AD group. Selecting the approvers list is easy but how do you get the "any approver" bit happening?

The answer lies in the check box directly below the Approvers selection input field: Assign a single task to each group entered (Do not expand groups). Think about it long enough and it actually starts to make sense—only one approver needs to complete their task before the workflow is deemed complete, or to paraphrase: “assign the task to the Approvers group and no one person in particular.” This option isn't selected by default so select it and you're golden.

SharePoint Approval Workflow - Any Approver