5

I have created a view on my list, but then accidentally deleted the list part of the view when editing it, just leaving the CEWPs.

Going under List settings, that view is now no longer listed so I cannot delete it from there. However, if I put the URL in directly

https://oursites.../Lists/My List/Team View.aspx

the page is still displayed.

This view name is not visible in any of the Site Contents, nor the

https://oursites..../SitePages listings.

Where can I find the view so I can delete it?

1
  • I had this very issue today! And was too lazy to ask the question. Thanks for asking.
    – Rothrock
    Commented Feb 6, 2016 at 2:54

5 Answers 5

1

You can delete it with the help of SharePoint Designer

  1. Open site
  2. Goto All files
  3. Select list folder
  4. Select your list
  5. There you'll have the view page
  6. Delete the page

And voila you are done.

0

It should still be able to add, remove, and edit list views using SharePoint Designer, even if for some reason they don't show up in your views. You just go to the site, open the list in question, and right there you should see everything in the back-end folder that SharePoint leaves aside for list views. This post talks about how to add and edit them rather than deleting them, but what you're looking for is how to get there. I think that to delete, all you have to do is right click and delete them, or select the view and delete it from the ribbon.

http://community.bamboosolutions.com/blogs/sharepoint-2013/archive/2012/09/19/how-to-create-custom-views-using-sharepoint-designer-2013.aspx

5
  • Had the same problem today. I went into SPD and couldn't see them listed there either. But the URL remains active.
    – Rothrock
    Commented Feb 6, 2016 at 2:57
  • Did you look under the explorer view of the site (I don't have SPD handy but I think it's at the bottom of the left bar and it's called "All Items")? Commented Feb 6, 2016 at 3:35
  • Nope no "All Items." I'm using SPD13 on prem. So maybe it is something that central admin has hidden?
    – Rothrock
    Commented Feb 8, 2016 at 20:50
  • I have SPD open now and I see an "All Files" folder underneath "Subsites". When I click into a list from there and then go to Forms, I see all of the views and pages for that list. If there are special edit/view/add pages for separate content types, those are listed in their own subfolders. Commented Feb 8, 2016 at 21:02
  • Nope nothing. I assume it is something our administrators have turned off. I did just trying using the REST endpoint to get all the views for that list and the missing one isn't there.
    – Rothrock
    Commented Feb 8, 2016 at 21:11
0

You can delete the List View using following PowerShell script.

     function Remove-SPListView { 
    Param(
     [string]$WebUrl,
     [string]$ListName,
     [string]$ViewName
     ) 
    Start-SPAssignment -Global 
    $SPWeb = Get-SPWeb $WebUrl
     $List = $SPWeb.Lists[$ListName] 
    $View = $List.Views[$ViewName]
 $List.Views.Delete($View.ID) 
    $List.Update() 
    $SPWeb.Update() 
    $SPWeb.Dispose() 
    Stop-SPAssignment -Global
}

You can replace

[$ViewName]

with name of your view.

Reference

2
  • Your view name would be "Team View"
    – 404
    Commented Feb 6, 2016 at 7:38
  • All great suggestions provided by everyone. Only one problem however, I don't have access to SPD.
    – southskies
    Commented Feb 11, 2016 at 0:27
0

Here is what I did. Tried the SP Designer fixes mentioned above, but the rouge view didn't show up in SPD. (I assume it is something our administrator has done.)

Tried using a REST endpoint [mysite]/_api/web/lists/getByTitle('Listname')/Views. But the rogue view was not in the returned items either. I figured if I could get it with a read command, maybe I could delete it with REST.

I used windows explorer to map a drive to my site > Lists > Listname and there was the rogue view. I was able to delete it there. That got rid of the page at URL message.

Interestingly it place the view into the recycle bin for my site. So I can now see it through the UI. It says "(no title)" and doesn't show any info that would identify it, except the time stamp so I know that is what it is.

I haven't tried restoring it from the bin yet.

2
  • SPD is not an option, mapping a network drive isn't working for me either. I've pinged the [mysite] domain, and then have gone into explorer using the address of \\101.101.101.101\groups/..../_layouts/15/start.aspx#/Lists but get the Error "Windows can't access ...\groups\..." "The network path was not found"
    – southskies
    Commented Feb 11, 2016 at 4:49
  • Bummer. What kind of installation are you on. We are on-prem. I just mapped to \[domain][managedpath][sitename] Then I could browse to to the Lists folder. I used the domain name, not the IP. Don't know if that would make the difference. I assume groups is a managed paths?
    – Rothrock
    Commented Feb 11, 2016 at 16:16
0

Before people look at a CSOM solution, beware - it will work, the view will delete, but if you try and create any new view, you will get the error

"Sorry, something went wrong An unexpected error has occurred."

My site has now become unusable. RIP.

I'm not posting that site that gave me the idea to ensure people don't go down this same path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.