Skip to main content

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

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.


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


Reply