women smoking

the url filename is invalid

Published

July 31, 2023

1 min read

Well after some search SPMarcel (short for SharePoint Marcelleke) has found a solution to a problem that we had.

History:I’m currently working with a client that needed a parser that parsed all kinds of different files and retrieve the information accordingly. While defining the site structure with a colleague is where the problems began. They need a lookup in the same site BUT  also needing a lookup to the parent site. Needless to say that this is quite hard to realize. When building an STP the lookup is to the document library of the site where you pulled the STP from. Also building the solution via Code or CAML didn’t provided a solution so we had to make discissions cancelling a few lookups. So on we went on building the site. We used Solution Generator which proved to be a great tool. We are now at the point that we create a blank site via code BUT after that activating a feature so that all the lists/document libraries with the list content types and columns is generated. Here is where it goes wrong. In my parser I automatically upload all the files to the correct document library. And suddenly my parser uploaded one file and crashes after that (not when uploading my file but adding the metadata), where in the old (read created via GUI) solution it could parse 3000 files. So after some debugging the error was found:

“The URL ‘FileName’ 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” .

Well good luck hunting :-) After a while of making google our best friend we found a blog also describing the same error but with a twist.

In this blog they are doing a migration from SPS 2003 to MOSS 2007 , not quite the same but the world isn’t perfect.

The key phrase in the blog however is

“The problem is with SharePoint Solution Generator”.

This is interesting, no? The Sharepoint world says that this is one of the best tools out there, but it seems that this has a big flaw in my eyes. I mean ok, nobody is going to make a schema.xml on his own, a tool that generates it is good enough.

It seems that the solution generator automatically assigns colname=“nvarchar” and colname=“ntext” fields (n is for a incremental number) to the schema.xml.

Why this is I don’t have a clue (if somebody can explain to my why it’s added but when removed you don’t see a difference?).

But this is where my solution comes from. After removing ALL the fields with colname=“nvarchar” and “ntext” in the Fields tag and rebuilding my WSP and installing it.

Everything workes fine.So many thanks to jerry for this one

Hope it helps Kind regards Andy

nonexistent-file-or-folder
colname