SharePoint Sites and Workspaces - Custom Template

Last post 07-20-2008, 11:09 PM by Jochen. 2 replies.
Sort Posts: Previous Next
  •  07-18-2008, 2:21 AM 24954

    SharePoint Sites and Workspaces - Custom Template

    I have a K2 [blackpearl] process with InfoPath integration. When  I submit the form I want to create a new site or workspace. So I am using the event "SharePoint Sites and Workspace". I step through the wizard and I can select a template. When I select a custom templated which I have created (and this template is stored in the Gallary Site Templates at SharePoint) the process is not working.

    If I select a standard template like "Document Workspace" all is done well. Is it not possible to use custom templates?

    This error message is shown in k2 Workspace:

    Server was unable to process request. ---> System.ArgumentException: Ungültige Datei oder Argumente für Webvorlage 'TestTemplate.stp'. at Microsoft.SharePoint.SPWebTemplateCollection.get_Item(String strKey) at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate) at Microsoft.SharePoint.SPWeb.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere) at Microsoft.SharePoint.SPWeb.SPWebCollectionProvider.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere) at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere) at K2SPWebs.CreateWorkSpace(String WSUrl, String WSTitle, String WSDescription, String WebTemplate, Boolean bUniquePersmissions, Bool

    I have also tried to upload my custom templare through stsadm "stsadm -o addtemplate -filename "C:\TestTemplate.stp" -title "TestTemplate" but I get the same error.

    Thanks.
    Jochen

  •  07-18-2008, 10:38 AM 24966 in reply to 24954

    Re: SharePoint Sites and Workspaces - Custom Template

    I don't know why you are getting the error, but I have used that wizard with custom templates before.  I didn't do anything special other than the normal procedures of adding a new template.

    I assume if you manually create a site based on the template, it works?  It looks from the error message above that the exception is originating in the SharePoint API.


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
  •  07-20-2008, 11:09 PM 24976 in reply to 24966

    Re: SharePoint Sites and Workspaces - Custom Template

    Yes you are right. If I manually create a site based on the custom template it works.
    So you think normally there should be no problem with creating sites based on custom templates using k2?

    Whats your "normal procedure of adding a new template"? Only go to the settings in MOSS and select "save site as template" and then it is available in the K2  wizard, rigth?

    Thanks. Jochen

View as RSS news feed in XML