This post is part of the Site directory troubleshooting series, you can access the other posts here.
So the focus is on the rendering and submit action of this form on the /_layouts/newsbweb.aspx page.
This is the pre-requisite check process for the form rendering:
Note: there is a typo in the ULS log entry itself, I pasted as you will see it in the log.
On submit event depending on the entry requirements server side validation runs to check all field values or to ensure that at least one is filled out.
Then a new list item is created in the site directory list in the site directory subweb with the new subweb’s title, description, url and the selected values of the form fields.
If there is an error during save the following line is logged into ULS if the Site Directory trace level is High or above ”CreateSitePanel1: An exception occured in OnFormSave(). Exception:”
If the form is not displayed on /_layouts/newsbweb.aspx
You can use the following powershell script to validate the root web’s property bag:
[Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
$sitecollurl = "http://bobmoss32:9000"; $site = new-object Microsoft.SharePoint.SPSite($sitecollurl);
$web = $site.OpenWeb();
# Display all properties in a table
$web.AllProperties | ft
#Fetch the critical properties and check them
$strwebguid= $web.AllProperties["DefaultSiteDirectoryWebId"] $strsiteguid= $web.AllProperties["DefaultSiteDirectorySiteId"] if ($site.ID.toString("D") -ne $strsiteguid) {"Error: SiteID does not match current site's ID. Save site directory settings in site actions to fix it."}
# Verify subweb’s existence by its ID
"Checking subweb with ID:" + $strwebguid
$sitedirguid = new-object Guid($strwebguid) $sdirweb = $site.OpenWeb($sitedirguid); $sdirweb.Url
# if a valid web can be opened and url is returned then the property bag looks ok.
Form submit fails and subsite is not added to the list.
For the site collection form rendering and troubleshooting read the post here.
Back to the table of contents