Forum Discussion
Andrew van Renen
Mar 20, 2017Brass Contributor
Exception calling SPListCollection.Add: : Invalid field name. {1faa4902-9115-44b9-bba7-791441ca1d6f}
I get an exception when trying to create a new list using PowerShell (error also happens in C#). This is my PowerShell: $lists = $rootWeb.Lists
$index = $lists.Add("avrTest", "", [Microsoft.S...
Dmitry Dolotovskikh
Nov 15, 2018Copper Contributor
Just de-activating and re-activating these features fixed the initial problems, but doing them out of order also disabled some publishing features on existing pages. I ended up creating a backup and restoring to a sandbox site multiple times in order to test different orders of de-activation and activation.
stsadm -o deactivatefeature -name publishingresource -url "sitecollectionurl" -force stsadm -o deactivatefeature -name publishingweb -url "subsiteurl" -force stsadm -o deactivatefeature -name publishingsite -url "sitecollectionurl" -force stsadm -o deactivatefeature -name fields -url "sitecollectionurl" -force
And then re-activate the features in the reverse order. The fields feature could be de/re-activated either at the beginning or the end.
- TheATL2029Apr 25, 2023Copper ContributorThanks Dmitry! This fixed the issue we were having as well.