Cannot complete this action. The URL Pages Default.aspx is invalid SharePoint

This SharePoint tutorial, we will discuss how to fix the error, 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.

Recently I got the error 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.
TECHNICAL DETAILS

Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: d020539d-7e1e-a03f-6251-c4ba6b921471

This error comes in a SharePoint 2013 which was migrated from MOSS 2007 using a 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:
https://SiteURL/default.aspx

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 designer. Then we try the below options.

cannot complete this action error in sharepoint

First, we saw that the page has been checked out by some other user, then we tried to do undo checkout (Right-click on the page -> undo checkout), 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
$file.File.UndoCheckout()
$file.File.Checkin("")
Cannot complete this action. The URL Pages Default.aspx is invalid.

Cannot complete this action. The URL Pages Default.aspx is invalid SharePoint

The second approach which we tried is:
Take a backup of the default.aspx file. In the SharePoint designer 2013, copy the 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.

You may like following SharePoint tutorials:

Here, we learned how to fix an error that comes while opening a SharePoint site, 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.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>