SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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