Quantcast
Channel: AutoSPInstaller
Viewing all articles
Browse latest Browse all 2279

Edited Issue: Additional web app with no site collection crashes [21433]

$
0
0
Using AutoSPInstaller GUI, one may easily configure an additional web app without a site collection. In this case, the AutoSPInstaller script fails with an XML reading error.

The problem line, #2661, is as follows:
```
if ($webApp.SiteCollections.SelectSingleNode("SiteCollection")) # Only go through these steps if we actually have a site collection to create

```

The issue is that SelectSingleNode fails if/when the config file contains the following element:
```
<SiteSollections />
```

The fix is to rewrite line #2661 as follows, which works in all cases:
```
if ($webApp.SiteCollections.hasChildNodes -eq $true) # Only go through these steps if we actually have a site collection to create

```

At least 3 different approaches are used throughout AutoSPInstallerFunctions.ps1 to test for the presence of child nodes. The approach above seems to handle all of the corner cases one might run into in an XML file.

Viewing all articles
Browse latest Browse all 2279

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>