none
Cannot remove a broken view (view ID and Name are $null) RRS feed

  • Question

  • A particular user is having issues with a specific list, and this seems to cause further issues with the list in general.

    After some digging around it would seem there's a strange view on this list; the view in question has no ID, no Title, no Query and barely any data. 


    We've tried setting the ID of the view manually (property is read-only). We've attempted to set various properties of this view, like the Query or Title only to receive an "Object reference is not set to an instance of an object" error. Obviously we can't delete the view itself, as the $list.Views.Delete() method requires an actual GUID as the parameter, and won't accept $null.

    Any idea what could be wrong and how to delete this view?



    Monday, September 2, 2019 2:39 PM

All replies

  • Do you have customized solution on your SharePoint? First we need to know how the view comes out.

    Justin Liu Office Apps & Services MVP, MCSE
    Senior Software Engineer
    Please Vote and Mark as Answer if it helps you.

    Tuesday, September 3, 2019 12:57 AM
  • Unfortunately the system is quite heavily modified, with a number of solutions present. Add to this workflows and custom InfoPath forms as well.

    That said, none of these things should be the cause of such a view, and while many can make use of the various views on the lists, the actual removal of a malformed view should not cause any further issues.

    Note that the list, in general, works fine for most cases. However accessing the settings for this list is impossible as it throws an error - quite likely since SP enumerates the views as part of the operation and can't handle a null-ID entry (which, all things considered, is quite understandable). Similar things happen when attempting removal via SharePoint Designer.

    Tuesday, September 3, 2019 7:25 AM
  • Hi,

    I suggest you open a ticket with Microsoft since your environment is heavily customized with solutions. There will be more professional engineers to help you resolve this issue.

    If you manage to have any progress, please remember to update this thread.

    Best regards,

    Chelsea Wu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, September 5, 2019 9:59 AM
  • Hi,

    I suggest you open a ticket with Microsoft since your environment is heavily customized with solutions. 

    Can you tell me what suggestions you would have if the system was NOT heavily customized? 
    Thursday, September 5, 2019 10:58 AM
  • First we need to figure out which customized solution causes the view issue.

    Justin Liu Office Apps & Services MVP, MCSE
    Senior Software Engineer
    Please Vote and Mark as Answer if it helps you.

    Friday, September 6, 2019 2:14 AM
  • Hi,

    As Justin said, this issue is most likely related to one of the custom solutions. Common suggestions will not suit your need.

    If your system doesn’t have custom solutions applied, it would be possible to reconstruct this particular list and compare to the original one. Ideally you will be able to locate the list view in content database and delete the list view with Null ID and name, which is not recommended in most scenarios.

    I don’t recommend you delete the list view directly as it might affect other components in the server.

    Best regards,

    Chelsea Wu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, September 6, 2019 8:41 AM