Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Issue
Whenever user tries to create or edit items in the List / Library they get the below error message, even though they have enough permissions.
Error form Logs
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.SPException: The URL 'Test_Pages/Testing.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. ---> System.Runtime.InteropServices.COMException: The URL 'Test_Pages/Testing.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.
System.Data.SqlClient.SqlException (0x80131904): The XML content that is supplied for the sparse column set 'tp_ColumnSet' contains duplicate references to the column 'nvarchar10'. A column can only be referenced once in XML content supplied to a sparse column set.
Solution
Open SQL Server Management Studio and open New Query for the Site Collection hosted database and run the below query by placing your list ID.
SELECT *
--- Place your Content Database under WSS_Content…
FROM [WSS_Content].[dbo].[AllUserData]
---- Place the List ID ………
where [tp_ListId] = '04ADDD01-FCC8-4A33-8444-5DE0D0E78DA8'
And [tp_IsCurrent] = 1
Output should be like below, and check for nvarchar10 contains which field from tp_ColumnSet XML, for me I checked for nvarchar10 in XML and i was able to see like this <nvarchar10>aspx</nvarchar10>, Which is pointing about aspx. Below is the Screenshot for the output result.
Open the list / library in the browser and create a New view for problematic list / library and add all the columns in the new view and checked for the field which contains aspx like below Screenshot.
After deleting the problematic field called User Field 1 fixed our issue, now we are able to create or edit items in the List / Library Successfully.