In this post we will discuss how we can resolve the below error which comes while opening a SharePoint 2013 page. The error comes as:
Cannot complete this action. The URL ‘Pages/Default.aspx’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
Sorry, something went wrong
The URL ‘Pages/Default.aspx’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: d020539d-7e1e-a03f-6251-c4ba6b921471
Date and Time: 1/7/2016 10:15:30 PM
You can also read:
– Site Title snippet in SharePoint 2013 custom master page
– Enable promoted links app in SharePoint 2013 publishing site
– SharePoint 2013 Logs for Analyzing or troubleshooting the issues related to workflows or Workflow Manager
This error comes in a SharePoint 2013 which was migrated from MOSS 2007 using database upgrade approach. Like first migrate from Moss 2007 to SharePoint 2010 and then from SharePoint 2010 to SharePoint 2013.
My site page url was like this:
When we visit this url it gave the error.
When we open the SharePoint site using SharePoint designer 2013, We are able to see default.aspx page in the deigner. Then we try below options.
First we saw that the page has been check out my some other user, then we tried to do undocheckout (Right click on the page -> undocheckout), but it still gave the same error message. Then we run the below PowerShell command to forcefully UndoCheckout the page but it still gave the same error message in PowerShell window.
$web = Get-SPWeb https://SiteURL/
$list = $web.Lists[“Pages”]
$file = $list.GetItemById(1); // ID of the file with the issue
The second approach which we tried is:
Take a backup of the default.aspx file. In the designer itself copy default.aspx file and save it in the same pages directory. Then we deleted the old file and then we rename the backup file to default.aspx and then it started working fine for us.
Hope this will be helpful.