Paul Liebrand's Weblog

Welcome to my blog mainly about SharePoint

Skip to: Content | Sidebar | Footer

Google Search

SharePoint: Cannot complete this action. The URL is invalid. It may refer to an nonexisten file or folder, or refer to a valid file or folder that is not in the current Web

12 June, 2014 (09:35) | SharePoint | By: Liebrand

After we recently upgraded our SharePoint environment we had a few pages that would throw the error whenever we attempted to check it in or discard checkout:

“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”

This error would occur no matter what account you use to resolve this issue. The following PowerShell script can be used to get around this issue:

$web = Get-SPWeb http://web
$list = $web.Lists["ListName"]
$file = $list.GetItemById(1); // ID of the file with the issue
$file.File.UndoCheckout()
$file.File.Checkin("")

 

You may also see the following error message appearing in the ULS logs:

"SqlError: ‘Arithmetic overflow error for data type tinyint, value = -112.’ Source: ‘.Net SqlClient Data Provider’ Number: 220 State: 2 Class: 16 Procedure: ‘proc_UncheckoutDocumentInternal’ LineNumber: 266 Server: ‘SQL Server Name’"


Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit