Thursday, September 29, 2011

This form-template is browser compatible, but it cannot be browser enabled on the selected site

The other day I ran into this problem when a customer called and told me that they could not publish a browse-compatible InfoPath form to their document library.  They sent me a screen shot of the following error:
I knew that the server was using SharePoint Server 2010 Enterprise edition so my next step was to verify that the Enterprise Features were Activated on the site collection.  To verify this I went to Site Actions / Site Settings / and under Site Collection Administration, click on the Site collection features link.

I verified that the SharePoint Server Enterprise Site Collection features are activated.

Next I clciked on Manage site features in the Site Actions section of Site Settings.  I verified that SharePoint Server Enterprise Site Features was activated as well.
Once that was confirmed I checked the form library settings that he was trying to use to see if he had turned off the ability to open the form in a browser.  To do this I went to the Form Library, clicked on the Library tab on the ribbon, then clicked on the Library Settings icon and then clicked on the Advanced Settings link.  In the Opening Documents in the Browser section verify that Open in the client application is NOT selected.
All of this was checking out but yet he still could not publish his form to the site.  On a whim I checked his permissions and he was indeed a Site Collection Administrator.  My next step was to create a new Form Library and try it again but he was still getting the same error.  This was the point where things just weren't making sense.  No one else was reporting that they were having problems publishing browser-enabled forms so I decided to create a new site collect, add this user as a site collection administrator and have him try to publish his form to the new site.  Viola!  It worked.  However, I was expecting that result, this step was more of a sanity check.

On the new working site I clicked on the All Site Content link to get a list of all of the libraries, lists, and sites that were in the site collection.  One of the libraries that I noticed was called Form Templates with a description of "This library contains administrator-approved form templates that were activated to this site collection.".  This looked promising so I checked the original site to see if this library existed there as well.  Turns out that the library did indeed exist on the original site.  However, I noticed that there was not a description for the library on the original site.  I moused over the link for the library on the original site and looked in the status bar to see that the URL was http://site/Form%20Templates.  I checked the URL for the library on the new site and it was http://site/FormServerTemplates.  Now we are getting somewhere!  On the original site I opened up the Form Templates library and saw that there were a couple of Excel documents in there, I wasn't expecting that.  I opened the Form Templates library on the new site and there were no documents listed.  I noticed that the New Document control in the ribbon was disabled as well, where on the original site it was available.  It looks as though someone deleted the original Form Templates library and tried to recreate it afterwards.  I noticed that the Excel documents in there had a Modified date that was about 9 months back.  Being the optomist I checked the Recycle Bin but the library was nowhere to be found.

I decided that I would try to create a new Form Templates library with the settings from the new working site.  Once I got the Form Templates library back to the original settings everything worked perfectly.

Here are the steps that I took to restore the Form Templates library:
  1. I moved the Excel documents to another document library on the site.
  2. Deleted the existing Form Templates library.
  3. Click on Site Actions / More Options.
  4. Choose Form Library from the list of templates.
  5. Click the More Options button.
  6. In the Name: field type in FormServerTemplates.  (When you create a list in SharePoint, the title is used to generate the URL for the list.  We will change the title a little later in the process.)
  7. (Optional) In the Description field type: This library contains administrator-approved form templates that were activated to this site collection.
  8. Under Navigation choose No.  this will prevent the list from displaying on the Quick Launch bar.
  9. Leave the rest of the settings at default and click on the Create button.
  10. Click on Library Settings in the ribbon.
  11. Click on Title, description and navigation.
  12. Change the Title to Form Templates and click Save.
  13. Next click on Advanced.
  14. Clear the Template URL: field in the Document Template section and then click OK.

Thursday, September 8, 2011

Corrupt Out Of The Box (OOTB) Workflows After SharePoint 2007 to 2010 Upgrade

Recently we performed a database attach upgrade of our MOSS 2007 farm to SharePoint 2010.  One of our Site Collection Admins reported that when he went into his document library settings to try and create an out of the box workflow, there were no templates listed.  This was happening on all document libraries in the site collection. I checked the site collection features and all workflow related features were activated.  I opened the site in SharePoint Designer and Workflows had nothing listed.  My next step was to see if deactivating/reactivating the workflow features would work.  I deactivated the SharePoint 2007 Workflows feature and reactivated it, then I went into the document library settings and there was still no workflow templates listed.  Next I tried deactivating the Workflows feature.  The deactivation went off without a hitch but when I tried to Activate it I got the following error:

After reviewing the ULS logs I found that there was an error creating a list called '_catalogs/wfpub' on the root site.  In SharePoint Designer I went to All Files/_catalogs and noticed that there was a sub folder called wfpub and within that folder there were empty subfolders for each of the OOTB workflow templates.  The icon for wfpub was a directory icon, not a list icon.  I renamed the wfpub folder to wfpub1 and reactivated the Workflows feature.  This time it worked, a new wfpub list was created and the templates were showing up in the document library workflow settings.

One piece of fall out from this is that by deactivating the Workflows feature on the site collection, it removed an OOTB workflow that was setup for a list on a subsite.  It was easy enough to recreate but you should probably go through all webs in the site collection and document the workflows that are there.