Hey All,
Restarting the machine worked. Now when I run: Get-SPWebTemplate | Sort-Object
Name I can see my new custom template in there with a correct name.
Again, not sure if theere is a timer job (would make sense) or restarting a
service made it actually pick it up, but its sorted now so thats a relief. Pity
it took a day to figure out
From: nigel_wither...@hotmail.com
To: conrad.grob...@gmail.com; ozmoss@ozmoss.com
Subject: RE: Sp2010 Custom Site Definition
Date: Thu, 19 Sep 2013 23:40:25 +
No it doesn't work - I get a message: WARNING: Template is not found and is
not applied. and PowerShell creates the site without applying a template. I
can confirm that it does set it correctly for the ootb ones - I checked a team
site and can see WebTemplate = STS, WebTemplateId = 1.
I assume that in the config database it actually keeps a link between template
name and id, and these are loaded up from parsing the XML on the filesystem.
I assume this because on my first deploy of the CKS template driven site
definition, it actually set this value correctly for me (tied to id 10
which the CKS template generates by default). However since then, I have not
been able to get this site name to change even when I have retracted that wsp,
and released other ones with a different name and using id 10. Instead what
happens is any site created with the new definition shows the old name as its
WebTemplate property.
So I know it is possible to set this correctly, I just cant seem to set with
any consistency (in fact, I reckon I set it once correctly for id 10, and
have never been able to set it again).
I might try restarting the machine to restart all the services, in case there
is some timer job that loads the values into the config database that is stuck.
Obviously a lot of this is conjecture, so if anyone actually knows whats goes
on here, please let me know.
From: conrad.grob...@gmail.com
Date: Thu, 19 Sep 2013 09:33:36 +0100
Subject: Re: Sp2010 Custom Site Definition
To: nigel_wither...@hotmail.com
I don't know if anyone else responded yet, but from my experience this seems to
be standard behaviour. I have never seen the webtemplate property populated for
sites based on custom web definitions (not even sure if it is populated for out
of the box templates). To create it via powershell, you should use
WESTFIELDNEW#0 (Name attribute from Template element from the webtemp file # ID
attribute from Configuration element).
Regards,Conrad.
On Thu, Sep 19, 2013 at 6:16 AM, Nigel Witherdin nigel_wither...@hotmail.com
wrote:
Hey guys,
This is driving me bat-shit crazy!
I have created a custom site definition that appears to be working correctly -
the site is created correctly and appropriate lists, features etc are executed,
however when I check the web out using Powershell, the WebTemplate value is
null. The WebTemplateID is correct.
As I want to create sites based on this template via Powershell, I need to know
that it has the correct WebTemplate value.
I have created the site with the CKS Blank Site Definition template, then after
suffering the issue with that, I created the webtemp and onet by hand - same
results.
I have attached the latest version of both these files, and would be extremely
grateful if anyone can point out where I am going wrong.
WEBTEMPWESTFIELDNEW.XML - deployed to \TEMPLATE\1033\XML
onet.xml - deployed to \TEMPLATE\SiteTemplates\WESTFIELDNEW
Many thanks
Nigel
___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss