Lately I have discovered a quirk with document libraries in WSS v3 and MOSS that is not very consistent.
Basially the problem I am seeing is that SharePoint doesnt consistenly handle query parameters passed to aspx pages store in document libraries.
For instance if you had a page in a document library called MyPage.aspx, and if you were to point it in your browser as
http://server/[site]/Document Library/MyPage.aspx?MyQueryParam=Value
your page would load only some of the time. More of than not SharePoint complains that "Item MyPage.aspx?MyQueryParam=Value does not exist.." Its almost asif SharePoint is looking for an item named MyPage.aspx?MyQueryParam=Value in the document library.
Solution - none that I know at the moment
Workaround - dont store your aspx/webpart pages in a document library if you want to pass query parameters to it. Store them on the root of you site.
Issue with Work Around - You wont be able to store MetaData (what would previously been stored in Columns of the Document Library) against your aspx page.
Solution - Store them programitcally using the Properties collection of the SPFile object.
Programatically? Yep programatically, however I do have a tool that helps me out. It lets me add and update properties in the Properties collection of the SPFile object. This uses the SPObject model and hence would need to run on the server. If anyone is interested I could clean it and put it up online for consumption.
tags: SharePoint, MOSS, 2007, WSS, Quirk, Tool, Object Model
Cross-posted from tariqayad.com