Sign In

 Content ‭[1]‬

​Alumni Test

 Content ‭[2]‬

How to delete corrupted layout page in Sharepoint

 

Other day we got this error "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index " on our custom pages. The issue was with our Custom Layout page that somehow got corrupted. We get the pointers from this post. After we identified the issue, we decided to delete this corrupted layout but it was not as simple as we thought. We could not check out the layout page thus no option to delete using item properties. Thankfully, we found a work around. 
Here is how you delete a corrupted layout page - 

1. Open your Site in SP Designer.
2. Open the Master Page Gallery under _Catalogs. 
3. Next, create a new folder in Master Page Gallery and move your corrupted layout page in this new folder. (Do not copy it)
4. Lastly, remove the Folder to get rid of your layout page.