Showing posts with label Folders. Show all posts
Showing posts with label Folders. Show all posts

Friday, September 7, 2012

Missing Metadata Navigation panel

Had a bit of a brief stumper just now.

I've started using the Metadata Navigation panel more in some of my libraries. The tree view is somewhat useful for folder-level filtering, but the real juicy bits come in the Key Filters list.

Well, this is all well and good, but what if you configure Metadata Navigation, and then the panel doesn't even show up? A quick survey of the Interwebs reveals that everyone thinks that there are only two causes to this issue:

  1. You turned off the feature
  2. Your masterpage is borking it
Two very reasonable conclusions, but in my case, I had two libraries in the same site and one library had the navigation and the other didn't! Egad!

After doing some comparisons (and also noticing some odd webpart behavior from a week ago when I first set these libraries up), I realized that the Metadata Navigation panel appears to only show up for List webparts in something resembling their default configuration (more or less).

For the uninitiated, view pages are simply web part pages that have data view parts with the view information preconfigured based on the ViewFields collection. To a limited extent, you can modify these pages and add extra webparts and such. Apparently, the webpart in one library had its toolbar set to Summary, and another set to Full. I updated the Summary toolbar part to Full, and the nav panel reappeared. I turned it back off, and the panel stayed, so it's not a dependency on the toolbar setting at the very least, but there may have been another missing property in the web part (this library and its singular view had been untouched since our migration to 2010), and it appears that changing the toolbar mode reset that.

I hope this saves someone some agony, but then considering how narrow my particular issues tend to be, I have to laugh at myself about it all...

Tuesday, September 4, 2012

Moving list items with "Manage Content and Structure"

File this one under "lazy programming".

It's well-documented that you can move list items around using SharePoint's Content and Structure manager in SP2007 and higher, much in the same way that you can use Explorer View in document libraries to shuffle things around.

I was tasked with making portions of several lists visible to external entities. No problem I say, we simply break them out into folders, secure the folders, and modify the existing views to ignore folders. Like any good admin, of course, I created my folders, moved the files, and then turned off the Create Folders option, because I don't want people to start going nuts with the folders and expose things they don't intend to be exposed.

A bit of background information - One of these lists was already problematic due to some SPD editing in SP2007 that apparently did not translate well in our migration to SP2010, so I was eager to blow this list away and recreate it. One of the issues at hand was the fact that the selected view always said "Default", even though none were named Default and sometimes when selecting views, the view would change, and sometimes it wouldn't, and it almost consistently ignored whatever the settings in the Modify View page indicated. That there was a Modify View page at all should indicate that our XSLT data view part is not fully-converted. The view itself appeared to work to the end user, but it we were unable to maintain it since SPD didn't recognize its own handiwork any longer and SP2010 felt the same way. I expect that in the background, there was a separate list view web part that was being modified but it was not visible on the web part page for the view.

Anyway.

So, inevitably, after moving everything into the new list (and creating content types!), I find out that a bunch of the content is missing. Naturally, I should've checked that the list item count in View All Site Content matched, but I'm used to using List Totals to do that, and well...when you can't trust the views, that obviously doesn't work very well!

Again, anyway. (This does have a point.)

I restore the old list under a new name, and then I start to try to migrate in the content, but alas - I cannot move it into the new folder directly? When I use Content and Structure to select the subfolder to put the missing list items, the expansion doesn't occur and the + simply disappears. I had created two other similar lists, and those worked fine, so what gives? Is it an issue with the default view hiding folders? I tried to change default views in the new list to one that doesn't hide the folder content type, but that didn't help.

It turned out that some sloppiness on my part gave way to the ultimate solution here. Content and Structure will check if a list has Create Folders turned on before it tries to iterate and display the folder list. Since I failed to turn off Create Folders in the other lists, they would expand normally in the target selection dialog. Turning on Create Folders in the affected library restored my ability to select subfolders as a copy/move target in Content and Structure.

This one puzzled me for a few hours across a couple of days, and I'm not exactly sure how one would find the solution to such a problem, but if this post helps at least one person save a little time (and not just a spambot that says "your solution worked for me thanks"), then it will have been worthwhile.