Deploying “Fantastic Fourty“ templates of MOSS 2007 on SharePoint 2010


There are the “Fantastic Fourty” templates you all now… They are create for MOSS 2007 and there are no update available for SharePoint 2010… Because of a migration of MOSS 2007 to SharePoint 2010 I need to deploy some of the site definitions to SharePoint 2010 to get the “old” sites working…

Do you know you can publish the Fantastic-40 on SharePoint 2010? – Here is a nice article about that: http://marijnsomers.blogspot.com/2010/06/fantastic-40-templates-on-sharepoint.html

On this page you’ll find updates solution packages: http://techsolutions.net/Blog/tabid/65/EntryId/17/Fab-40-Templates-for-MOSS-2010.aspx

 

BUT…

After deployment of the base solution “ApplicationTemplateCore.wsp” this is what I liked to do:

1. Create a Site Collection

image

2. Enter some data and choose the “Custom” category for the site template. Click “Select template later”…

SNAGHTMLc2b02f

3. Now create the site and open them. You get:

image

4. Now open the “Site Settings” from the “Site Actions” menu.

5. Click “Site Collection Features”.

6. Try to activate feature “Fields and Content Types for the Windows SharePoint Services Application Templates”

image

7. You get:

image

 

But as I tried to deploy and activate them I got this error:

  

Server Error in '/' Application.
--------------------------------------------------------------------------------

The field with Id {46b00cd2-bc51-45d8-87e1-68f1be35275f} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.SharePoint.SPException: The field with Id {46b00cd2-bc51-45d8-87e1-68f1be35275f} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

 

Stack Trace:

[SPException: The field with Id {46b00cd2-bc51-45d8-87e1-68f1be35275f} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite.]

   Microsoft.SharePoint.Utilities.SPUtility.ThrowSPExceptionWithTraceTag(UInt32 tagId, ULSCat traceCategory, String resourceId, Object[] resourceArgs) +27772295   

Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionFieldsAndContentTypes(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce) +23652209   

Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce) +138   

Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce) +25437423   

Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly) +27496895   

Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope) +150   

Microsoft.SharePoint.SPFeatureCollection.Add(Guid featureId, Boolean force, SPFeatureDefinitionScope featdefScope) +83   

Microsoft.SharePoint.WebControls.FeatureActivator.ActivateFeature(Guid featid, SPFeatureDefinitionScope featdefScope) +699   

Microsoft.SharePoint.WebControls.FeatureActivatorItem.BtnActivateFeature_Click(Object objSender, EventArgs evtargs) +140   

System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140   

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

 

Okay… This is the solution that I’ve developed some minutes ago.

1. You need to decompress the “ApplicationTemplateCore.WSP” file. – It’s nothing else than a CAB file renamed to WSP. – Use 7zip to decompress it.

2. Open the file <fantastic40-folder>\ApplicationTemplateCore\TSATypes\Fields.xml. Search for 46b00cd2-bc51-45d8-87e1-68f1be35275f and remove one of the double entries of this field definition:

SNAGHTML5a2ab1a

image

(Remove the code in the red frame.)

3. By the way: This is not the only bug in the WSP file. But for now we go ahead… We need to recreate the WSP file.

This is not easy.

a) First download “DDFGenerator.exe” from http://ddfgenerator.codeplex.com/

b) Open a command line prompt.

c) Type the path to “DDFGenerator.exe” and specify the path of the WSP content as parameter.

image

d) In the WSP content folder you’ll find a file named “solution.ddf”. Edit this file in Notepad. Insert “.Set CabinetNameTemplate=ApplicationTemplateCore.WSP” as 5th line. – Save and close the file.

image

e) Go into the folder and execute “MakeCab.exe /F solution.ddf”

SNAGHTMLda5e2a

Now you have a new WSP file in a sub folder of the WSP content folder.

image

4. Now run a solution upgrade.

5. Try to activate the feature again. You get another error:

image

The field with Id {26118c12-ea11-48ae-950b-a7219a9738f8} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite. 

6. If your search for GUID “26118c12-ea11-48ae-950b-a7219a9738f8” you’ll find another field that is deployed twice:

<Field ID="{26118C12-EA11-48ae-950B-A7219A9738F8}" Name="TextFileName" DisplayName="$Resources:core,Name;" Type="Text" Group="_Hidden" Sealed="TRUE" AllowDeletion="FALSE"></Field>

…in file <fantastic40-folder>\ApplicationTemplateCore\TSATypes\Fields.xml

Here you need to delete one of the entries…

7. The next try also results in an error:

image

The field with Id {ebb85cf8-047c-4ba7-9fd6-01bfa5ef126d} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a299} was found in the current site collection or in a subsite.

8. Search for GUID “ebb85cf8-047c-4ba7-9fd6-01bfa5ef126d”. – Here it’s more complexe to resolve this issue. Because there are to diffrent fields with the same ID!

image

(It’s file <fantastic40-folder>\ApplicationTemplateCore\TSATypes\Fields.xml again!)

You need to create a new ID for one of the field.

I’ve choosen “93B5756C-727F-4C4B-A081-E8654A234739” as new ID for field “AssetPurchasePrice”. You can use this GUID too!

Now you need to change every reference to field “AssetPurchasePrice” in all files of the project. Here is a list of files:

  • <fantastic40-folder>\ApplicationTemplateCore\TSATypes\Fields.xml
  • <fantastic40-folder>\ApplicationTemplateCore\TSATypes\CTypes.xml
  • <fantastic40-folder>\ApplicationTemplateCore\LendingLibraryList\Assets\schema.xml
  • <fantastic40-folder>\ApplicationTemplateCore\InventoryTrackingInventoryList\Inventory\schema.xml
  • <fantastic40-folder>\ApplicationTemplateCore\AssetTrackingProposalsList\Proposals\schema.xml
  • <fantastic40-folder>\ApplicationTemplateCore\AssetTrackingAssetsList\Assets\schema.xml

Be sure to replace the ID of all references of “AssetPurchasePrice” with the new ID! Don’t touch the references of the other field “AssetDateRetired” with the same ID. Do not use Search and Replace to replace the GUID.

A sample for file <fantastic40-folder>\ApplicationTemplateCore\AssetTrackingAssetsList\Assets\schema.xml after replacing the ID of “AssetPurchasePrice”:

image

(In the red box I’ve replaced the ID. In the green oval I’ve left the ID untouched!)

BTW: The GUID of “AssetDateRetired” is “EBB85CF8-047C-4ba7-9FD6-01BFA5EF126D”: There are lower case letters and upper case letters in the GUID. I think they are edited by hand by someone and that’s the reason of the error…

9. Save your work and repack the solution as described above and deploy the package to SharePoint.

10. Now I’m able to activate the feature “Fields and Content Types for the Windows SharePoint Services Application Templates”:

image

12. That’s it so far.

13. Now I’d like to use a Fantastic-40 template. In my case “Helpdesk”. I deployed the “Helpdesk.WSP” of the Fantastic-40 bundle to SharePoint 2010. – Without any error.

14. Click the homepage of your site and you’ll reach the “Template Picker” application page if you did not select a template for the site before like me.

image

15. Now I have a working “Helpdesk” site – as far as I can see.

image

Advertisements

5 thoughts on “Deploying “Fantastic Fourty“ templates of MOSS 2007 on SharePoint 2010

  1. This is awesome work. Any chance you can post the .wsp file you finally ended up with to save me a ton of work? If not, that’s cool too. Thanks!

  2. If a person has or can setup a Moss 07 environment, they can create a blank HelpDesk site and upgrade the Moss 07 environment to 2010, and then create a site template from the upgraded HelpDesk site.

  3. Has these template are working on share point 2010 environment? i don’t think so because i have individually downloaded the template and added in the solution gallery in share point 2010 but it didn’t worked out.

    let me know

  4. Has these template are working on share point 2010 environment? i don’t think so because i have individually downloaded the template and added in the solution gallery in share point 2010 but it didn’t worked out.

    let me know

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s