A SharePoint Evil is an issue/error that is so ambiguous and misleading that Google will shows 50 hits, with 10 different suggested solutions, and none of them work for your particular case. (Eeerr.. so what’s described below may not work for you – but I hope it will).
I have experienced this evilness in 2 different scenarios. The 1st scenario is related to lookup columns and described here: https://bernado-nguyen-hoan.com/2011/03/22/sharepoint-evil-1-the-url-url-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 will describe the 2nd scenario – which relates to duplicate ColName for fields on the list. Same as before you will get this error message when editing item properties:
The URL ‘[url]’ 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.
If you look in the ULS, you will see the error message above, and closely before/after it, you will see an error message relating to SQL like this:
Unexpected query execution failure, error code 8143. Additional error information from SQL Server is included below. “Parameter ‘@nvarchar1’ was supplied multiple times.” Query text (if available): “DECLARE @@S uniqueidentifier; DECLARE @@W uniqueidentifier; DECLARE @@DocId uniqueidentifier; DECLARE @@DoclibRowId int; DECLARE @@Level tinyint; DECLARE @@DocUIVersion int;DECLARE @@IsCurrentVersion bit; DECLARE @@iRet int; DECLARE @DN nvarchar(256); DECLARE @LN nvarchar(128); DECLARE @FU nvarchar(260); SET @DN=N’regions/emea/admin/docs/Funding Proposals 2008-09/WE’;SET @LN=N’WESTERN EUROPE – Post Management – Funding Request.doc’;SET @FU=N’regions/emea/admin/docs/Funding Proposals 2008-09/WE/WESTERN EUROPE – Post Management – Funding Request.doc’;SET @@S=’BC4E859F-0E05-4635-91A2-044BD335D7FE’;SET @@W=’78A13FD9-2BF8-4D97-9E70-990C0D5C4E42′;SET @@DocUIVersion = 512;BEGIN TRAN; IF @@iRet <> 0 GOTO done; SET @@Level =255; EXEC @@iRet = proc_UpdateDocument @@S, @@W, @DN, @LN, ?, ?,0,2538,0,25,268,NULL,’20110418 05:00:50′,0,0,1,1,54,0,2,0,-2,NULL,1,0,NULL,1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,@@DocId OUTPUT, @@Level OUTPUT , @@DoclibRowId OUTPUT,? OUTPUT,? OUTPUT,? OUTPUT, ?,?; IF @@iRet <> 0 GOTO done; EXEC proc_DirtyDependents @@S,1,@FU; EXEC @@iRet = proc_UpdateListItem @WebId=’78A13FD9-2BF8-4D97-9E70-990C0D5C4E42′,@SiteId=’BC4E859F-0E05-4635-91A2-044BD335D7FE’,@ListID=’8306140D-F4F6-44BB-AB04-C39EF33DD759′,@ItemId=@@DoclibRowId, @NewUIVersion = @@DocUIVersion OUTPUT,@RowOrdinal=0,@ReturnRowset=1,@Size=NULL,@tp_Version=4,@ItemName=N’WESTERN EUROPE – Post Management – Funding Request.doc’,@IsDocLib=1,@MajorVersionsLimit=0,@MajorMinorVersionsLimit=0,@UserId=54,@Level=@@Level, @TimeNow=’20110418 05:07:44′, @tp_ContentTypeId = ?,@nvarchar11=?,@nvarchar12=?,@nvarchar13=?,@nvarchar15=?,@nvarchar16=?,@nvarchar7=?,@nvarchar8=?,@nvarchar9=?,@ntext2=?,@int1=?,@tp_ContentType=?,@nvarchar1=?,@nvarchar2=?,@nvarchar3=?,@nvarchar4=?,@nvarchar5=?,@nvarchar6=?,@nvarchar17=?,@nvarchar18=?,@nvarchar1=?,@nvarchar2=?,@tp_ModerationStatus=?,@tp_ItemOrder ….
This is a pretty long and meaningless message – except for the part I’ve bolded: Parameter ‘@nvarchar1’ was supplied multiple times.
This means there are multiple fields in the list pointing to the same underlying DB column in the database.
So how could this have happened? In the list XML schema we defined all the fields for the list, e.g.:
<FieldID="{c29e077d-f466-4d8e-8bbe-72b66c5f205c}"Name="URL"SourceID="<a href="http://schemas.microsoft.com/sharepoint/v3%22StaticName=%22URL%22Group=%22Base">http://schemas.microsoft.com/sharepoint/v3"StaticName="URL"Group="Base</a> Columns"Type="URL"DisplayName="URL"Required="FALSE"Customization=""ColName="nvarchar1"RowOrdinal="0"ColName2="nvarchar2"RowOrdinal2="0"/>
The ColName attribute above should NOT be specified in the schema. You should let SharePoint decides which DB column to use.
If your schema has these attributes, it will still works when you initially deploy. The problem will come when the list has been in production for sometime, and users add/remove columns to the list using the UI, and you then add additional fields to the schema, and you specified the ColName to use, and unknowingly to you, one of those ColNames is already being used by the fields added by the user (through the UI).
Unfortunately, one of the common practices for SP developers is to add the field to the list using the SP UI, then use a tool such as SharePoint Manager to extract the XML and paste it into the schema they are coding. If you do it this way, ensure that you clear out the ColName attributes (and possibly others as well) that SP has put in on a deployed list.