As I was writing up a post in my collection of bugs with the XSLT List View Web Part I received a comment on a previous post regarding using the XLV with a list from a different site. The commenter (thanks Roy!) was reporting an issue when viewing a document library from one site on another site – but only when trying to use folders in the library!
I’ve therefore added this post to my series:
- View settings lost on saved XSLT List View Web Part
- Content type enabled list XLV can’t be added to sites
- XSL Link Property and the ECB Menu
- Multiple web front ends, conflicts and the XLV
- Unable to use folders with cross-site XLV (this post!)
The Bug
This is a very straight forward bug to describe. You place an XSLT List View Web Part of your document library onto a different site than where the library resides – perhaps by saving the web part into the gallery through SharePoint Designer, or perhaps by creating the .webpart file manually. After doing so you try to click on a folder item to see the contents of that folder in your XLV – as per the expected behaviour. In doing so you get to see an error message like this:
This error seems to occur no matter if you add the web part through SharePoint Designer or via the browser.
Example
Here’s an example of this in action. I’ll first create a document library containing a folder. Using SharePoint Designer 2010 I’ll then save a web part to the gallery for this document library. Adding this web par to the site where the library exists via the browser and I get the web part, fully functional, as expected.
Now, I navigate to a different site and add the web part again. At first glance it appears that everything is working as expected – however I then click on a folder to view the contents of that folder. BOOM – that’s where I see the error message shown above.
Explanation & Workaround
I haven’t been able to find the root cause of this issue – however my suspicion is that this is an error in the out of the box XSL. This is because the error message seems fairly clear that it is looking in the ‘wrong place’, i.e. in the current site rather than the library’s site. This feels like an error that could be foreseen/ bypassed in the XSL to me.
In terms of a workaround then I’m stumped again unfortunately. The only option I can think of is to avoid the situation by setting up your view to not sure folders – which is less than ideal.
[…] Unable to use folders with cross-site XLV […]
From what we just tested, as long as we don’t have in the page any other XLV web part, the folder navigation is working. After we add a regular XLV of a doc lib on the same page, the bug mentioned here is present.
Hi Lucius,
That’s good news (sort of!). Many thanks for posting that info up here.
Glyn
[…] XLV Bug: Unable to use folders with cross-site XLV XLV Bug: View settings lost on saved XSLT List View Web Part […]
Thank you for the article. It is still not working in SP 2013.