- October
- 12
- 2007
NavBar ID Attrib in ONET.XML file can prevent application of site template
Posted by seanharrison
No Comments »
Just For Posterity Department:
I was trying to create my first custom Site Definition. This was my first foray into ONET.XML other wonders. I thought I was making some simple changes, but creating a site with my new Site Definition (by choosing it from the site template list) kept failing. In the browser, SharePoint displayed this helpful error message:
Cannot complete this action.
Please try again.
Mmmmm. Hoping for a little more, I dig into the log folder at C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12LOGS. It isn't any more helpful.
Failed to apply template "LICOR_Team_Site#0" to web at URL "http://sandbox1:8081/7", error 0×80004005
<snippet from log file>
10/12/2007 09:46:25.69 w3wp.exe (0×1DE0) 0×1650 Windows SharePoint Services General 72h9 High Failed to apply template "LICOR_Team_Site#0" to web at URL "http://sandbox1:8081/7".
10/12/2007 09:46:25.69 w3wp.exe (0×1DE0) 0×1650 Windows SharePoint Services General 72k2 High Failed to apply template "LICOR_Team_Site#0" to web at URL "http://sandbox1:8081/7", error 0×80004005
10/12/2007 09:46:25.69 w3wp.exe (0×1DE0) 0×1650 Windows SharePoint Services General 8kh7 High Cannot complete this action. Please try again.
</snippet from log file>
I eventually find out that my problem was in a <NavBar> element. I added a custom NavBar element and, not knowing any better, I changed the ID attribute to the integer 5001. MSDN just says that the param "Specifies the ID" [ http://msdn2.microsoft.com/en-us/library/ms430616.aspx ], so I just picked something not like the others, which were in the 1001-1040 range.
5001 was bad. I don't know why, but there is either a limit to what you can assign OR there was another object not specified in this particular ONET file that conflicted.
Changing my custom NavBar ID to 1030 made my Site Definition work.
Anyone know why?