“Access Denied” Error in Discussion List Templates

Another strange error happened to me on customer premises.

THE SYMPTOMS

You have developed a custom discussion list in SharePoint. You have saved the custom discussion list as a template. You create a new discussion list from this template.

When you create a new thread or a post in this new list (created from a template), you don’t see the “Edit Properties” or “Delete” buttons, even if you have the right permissions. Additionally, you might have “Access Denied” errors if you try to edit the thread or the post directly.

THE CAUSE

I was puzzled by this one at first. However, the customer contact (thank you, Toni) had previously found a useful blog entry, related to the problem although not exactly the same. To make it short, the problem resides in the fact that SharePoint somehow corrupts the security information saved for the list when it saves the list as template. More specifically, it drops the RenderXMLUsingPattern boolean attribute in PermMask field of the discussion list.

This seems to be a known bug in SharePoint, confirmed by Microsoft.

THE SOLUTION

There are several possible solutions, depending on whether we want to fix an existing discussion list created with the “broken” template or we want to fix the template.

Fix an Existing Discussion List

In essence, we need to change PermMask field of the existing list and add the missing attribute (RenderXMLUsingPattern=”TRUE”). You can do it with:

Fix the Template

The process here is to repack the template with the correct XML.

  1. Download the template STP file from the List Templates of your site collection to your local disk
  2. Change the file extension to CAB
  3. Extract the contents of the CAB file into a folder
  4. Open manifest.xml file in the folder
  5. Look for the Field ID=”{BA3C27EE-4791-4867-8821-FF99000BAC98}” Name=”PermMask” entry. Add the following attribute in the Field node: RenderXMLUsingPattern=”TRUE”
  6. Repack the files in the folder with a CAB creation utility (such as CAB Maker), creating a new CAB file
  7. Change the file extension to STP
  8. Upload the new template to List Templates of your site collection

5 thoughts on ““Access Denied” Error in Discussion List Templates”

  1. Are you required to repack the files?

    Are you not able to just open the manifest.xml file from within the cab, make changes and then save it back again?

    I’ve done this in the past and figured it worked just like a zip archive. Oops.

  2. take alook at this:

    The PermMask field definition is out of sync between the base type definition and
    the shared column definition — specifically missing the RenderXMLUsingPattern
    definition in the latter case.

    Cumulative Update
    Description of the Windows SharePoint Services 3.0 cumulative update package: February 24, 2009

    http://support.microsoft.com/kb/961755

    Description of the SharePoint Server 2007 cumulative update package (MOSS server-package): February 24, 2009
    http://support.microsoft.com/kb/961756

Leave a Reply

Your email address will not be published. Required fields are marked *