locked
AllItems.aspx list view disappear SharePoint 2007 RRS feed

  • Question

  • Hi

    We come in with an issue with some random list around 75 not hidden list over 3 farms over 350 sites.

    Some list doesn't have any default view because the default AllItem view just disappeared. 

    When trying to access list from the menu or from the "All Site Content", you are redirected to the list properties instead of the allitems.aspx


    Also if you look at the properties page at the field Web only return the webApp url.

    If you enter the direct url, it work, SharePoint doesn't return an error, but the view will show nothing.
    ex: http://webapp/location/XYZ/CTUOnyxDev/Online/Project%20Documents/Forms/AllItems.aspx


    If I tried to recreated them manually with the same name, it create it with the url allitems1.aspx and if I try to change it to allitems.aspx I got the error message that it already exist.

    Ex: "../../Forms/AllItems.aspx already exists. It was last modified by  on 17 Jul 2009 10:11:34 -0000."

    Any idea how to restore them, to prevent them ?


    David G.

    Thursday, March 8, 2012 5:26 PM

All replies

  • Hi David,

    Thanks for your post.
    1. When you access to the document library or list from “All site content” link, it will go to the application page, whose url likes “_layouts/ListEdit.aspx?List={2F1D624E-9D7F-434E-9B91-DF95A7175CD8}&Source=..”. not the allItems.aspx page;
    2. Did you customize the List or Library using SharePoint Designer? Did you delete or create new view in the SharePoint Designer 2007.
    3. A workaround about this is creating a new view. You can create a new View for the List or library, and then set it as default view. http://office.microsoft.com/en-us/windows-sharepoint-services-help/set-a-default-view-HA001161237.aspx
    4. You can delete the default view (allItems.aspx) using SharePoint API at first, and then create a new one.
    http://stackoverflow.com/questions/1488115/how-do-i-delete-a-list-view-via-the-sharepoint-api
     

    Thanks,
    Wayne Fan
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please contact  tnmff@microsoft.com.


    Wayne Fan

    TechNet Community Support

    • Marked as answer by Rishabh Mathur - MSFT Thursday, March 15, 2012 9:55 PM
    • Unmarked as answer by DaveRG Friday, March 16, 2012 12:12 PM
    Friday, March 9, 2012 6:53 AM
  • Hi Wayne,

    Thanks for your quick reply.
    1. When you access to the document library or list from “All site content” link, it will go to the application page, whose url likes “_layouts/ListEdit.aspx?List={2F1D624E-9D7F-434E-9B91-DF95A7175CD8}&Source=..”. not the allItems.aspx page
      - Yes it is indeed the link that showing, instead of redirecting to the default view.

    2. Did you customize the List or Library using SharePoint Designer? Did you delete or create new view in the SharePoint Designer 2007.
      - Our user did indeed use SharePoint Designer for alot of sites, but I dought that they did modify everyone one of them, but I still need to confirm with them.
      - I didn't try to delete the AllItems.aspx and recreate it via SharePoint Designer 2007, I try to not use it if possible.

    3. A workaround about this is creating a new view. You can create a new View for the List or library, and then set it as default view.http://office.microsoft.com/en-us/windows-sharepoint-services-help/set-a-default-view-HA001161237.aspx
      - As you can see in my original post, I indeed try recreate them via "_layouts.aspx/ViewType.aspx?List=%7B3F5285CB%2D056E%2D4873%2D9253%2DE0C7E76E755B%7D" then selected the "All ..." template under Start from a View template, but for most it recreate them with the url _layouts/allitems1.aspx

    4. You can delete the default view (allItems.aspx) using SharePoint API at first, and then create a new one.
    http://stackoverflow.com/questions/1488115/how-do-i-delete-a-list-view-via-the-sharepoint-api
    The thing is event if the direct URL work, if I try to look at it via the command lets I don't have an ID.

    Here is the script that I use to trap those list:

    # Sharepoint basics functions
     function Get-LocalFarm {
        return [Microsoft.SharePoint.Administration.SPFarm]::Local
     }
     filter Get-WebService {
        $webServices = new-object  Microsoft.SharePoint.Administration.SPWebServiceCollection($_)
        $webServices
     }
     filter Get-WebApplication {
        $_.WebApplications
     }
     filter Get-SiteCollection {
        $_.Sites
     }
     filter Get-Web {
        $_.AllWebs
     }
    
    $myDate = get-date -uformat "%Y-%m-%d"
    $destination = "D:\MissingView_SP2007_NCSA_$myDate.txt"
    #create a CSV file 
    "ParentURL;List Title;Is Hidden;List GUID;List Settings URL" > $destination #Write the Headers in to a text file
    
    $SPWebApps = Get-LocalFarm | Get-WebService | Get-WebApplication
    
    Foreach ($WA in $SPWebApps){
    	Write-Host "Loading" $WA.Name
    	Foreach ($SPsite in $WA.Sites)  # get the collection of site collections
    		{
    		Write-Host "	- Loading site" $SPsite.url
    		Foreach($SPweb in $SPsite.AllWebs)  # get the collection of sub sites
    			{
    			Write-Host "		- Loading web" $SPweb.url
    			Foreach ($SPList in $SPweb.Lists){
    				Write-Host "			- Checking list" $SPList.Title
    				if ( !($SPlist.DefaultViewUrl) ) # Grab only the list if there's no default view set.
    					{
    					Write-Host "				- List "$SPList.Title" doesn't have a default view !"
    					if (!($SPList.Hidden)) # Grab only the list that are not in hidden mode.
    					{
    					$SPweb.Url + ";" + $SPList.Title +";"+ $SPList.Hidden +";"+ $SPList.ID +";"+ $SPweb.Url+ "/_layouts/listedit.aspx?List="+$SPList.ID >> $destination  #append the data
    					}
    					}
    				if ($SPlist.DefaultViewUrl -imatch "allitems1.aspx" ) # Grab only the list if there's no default view set.
    					{
    					Write-Host "				- List "$SPList.Title" have a modified default view !"
    					if (!($SPList.Hidden)) # Grab only the list that are not in hidden mode.
    					{
    					$SPweb.Url + ";" + $SPList.Title +";"+ $SPList.Hidden +";"+ $SPList.ID +";"+ $SPweb.Url+ "/_layouts/listedit.aspx?List="+$SPList.ID +"; modified default view">> $destination  #append the data
    					}
    					}	
    				}
    			}
    		}
    	}

    If you put a break point after "Write-Host "  - List "$SPList.Title" doesn't have a default view !" and look at the variable you will see no info.

    Sometime I will get a few view that are not "allItems.aspx" or sometime view witout title:
    [DBG]: PS C:\> $SPList.Views | select title,ID,Url | ft -AutoSize

    Title     ID                                                            Url        
    
    -----     --                                                            ---        
    
          f2b6fde0-46e6-437d-9cf9-ce1da365eb39 default.aspx

    And other times I will got simply nothing:

    [DBG]: PS C:\> $SPList.Views | select title,ID,Url | ft -AutoSize
    [DBG]: PS C:\> 

    Here a exemple of a list were I got that AllItems.aspx already existed but as you see it's not listed:

    [DBG]: PS C:\Program Files\Common Files\Microsoft Shared\web server extensions\12> $SPList.Views | select title,ID,Url | ft -AutoSize
    Title                                                           ID                                                               Url                                                
    -----                                                           --                                                                ---                                                
    Mode Explorateur                             d94df069-ecf0-448c-b19c-0e79fb845ca6     Documents et outils Intgration/Forms/WebFldr.aspx  
    Fusionner les documents                   71aebbb8-55a0-46bd-8e2f-9153bea8a418  Documents et outils Intgration/Forms/Combine.aspx  
    Recréer un lien entre ces documents  b74b1f86-8e97-45bd-9bae-5eb6eb95b0de  Documents et outils Intgration/Forms/repair.aspx   
                                                          a22e3121-0414-4ff6-ab5c-df573047766b    Page web/Intégration.aspx                          
    AllItems                                          c7a7111d-8821-4b35-ac95-5c6d4846dcad   Documents et outils Intgration/Forms/AllItems1.aspx


    David G.



    • Edited by DaveRG Friday, March 9, 2012 9:00 PM Syntaxe and reformating
    Friday, March 9, 2012 8:52 PM
  • Hi Wayne,

     I unmark as Answer because like the post I did under, none of your solution worked for me. :(

    I still have pages called AllItems1.aspx that I can't rename because the list isn't showing.
    And i still don't know what cause this.

    Thanks!


    David G.

    Friday, March 16, 2012 12:17 PM