I have a SharePoint 2010 site that employees use to upload photos into and then other employees rate the photos. The site has been operational for over a year. Something happened to the view on my home page, so I'm trying to rebuild it. I've started with a clean new aspx page based on the master page, did a create custom content in Placeholder Main, and inserted a web part zone.

Then I go to Insert | Data View | Pictures (which is the name of the library used in the view) I get back the following error:

xslt transform failed : 0x80004005 : type mismatch. Error occurred during a call to property or method 'URLDirName'.

When I try to insert a data view of any other library, it works fine. So it must be something with this library.

Has anyone ever seen this error before and been able to fix it?


It seems that the Pictures library has been customized and now has a custom XSLT defined and there is an error in this XSLT.

Check if default view of this library has Xsl or XslLink property defined, explore the custom Xsl transformation and search for "ddwrt:UrlDirName" function call. Ensure that variable or parameter passed to this call is string by wrapping it to string XPath function, like this:


More about ddwrt:UrlDirName function you can find on Marc D Anderson blog:

Similar question on MSDN forums:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.