SharePoint - Cannot get ghost document

We chased a fun bug in the afternoon after we deployed our new package to our staging server.

Symptom:

Our customized Content Query Web Parts stops rendering.
But we noticed they were still functioning when we drop into edit mode.

Hint:

This gave us the hint that our XSL was probably stuffed – but it checked out ok in SharePoint designer*.

Detective Work:

Digging through the SharePoint logs, we came across two lines that are incredibly suspicious:

0x17C4    Windows SharePoint Services       Web Parts                         89a1    Monitorable    Error while executing web part: System.Xml.Xsl.XslLoadException: XSLT compile error. An error occurred at (1,482). ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.     at System.Net.HttpWebRequest.GetResponse()     at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)     at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)     at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)     at Microsoft.SharePoint.WebPartPages.WSSXmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)     at System.Xml.Xsl.Xslt.XsltLoader.CreateReader(Uri uri, XmlResolver xmlResolver)     at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(Uri uri, Boolean include...    

0x17C4    Windows SharePoint Services       General                           72ks    Medium      Cannot get ghost document:

Features\blah\blah.xsl    

Story:

The path to the XSL was familiar, and the problem immediately became apparent.  It was the old path, we’ve since re-organized our deployment package, and that old path to the xsl file no longer works.

The Fix:

Drop into Style Library\ and delete all the XSL files that are ghosted.
Deactivate and reactivate the XSL feature so they get re-ghosted.

Notes:

SharePoint designer must have cached the file at some point, so it was happily showing us a copy of the file while in reality due to our re-organization of the feature it wasn’t actually available anymore.

Re-organizing feature package always has hidden costs…

SharePoint – for those times when you really got to kill a list

This is a simple tip

So the list template stuffed up a list and you can’t get to it in “site library and lists”

The backdoor way to remove the list is:

stsadm -o forcedeletelist -url http://server/Lists/list-name

http://technet.microsoft.com/en-us/library/cc262609.aspx

The new flood of stuff coming out of Windows Live are really nice

I do have FriendFeed, but I think too little people know about FriendFeed (http://friendfeed.com/johnnliu) - but it's a very techy solution.  I think Windows Live's offerings will reach more people quicker.

Anyway,

It's already hooked to to my blog, MSN messenger

I've got 2 web activities enabled:

Flickr
Twitter

still waiting for a few more web activities to become enabled:

digg
youtube
facebook

Theoretically I can just use the RSS feed from these, but I want to see what additional features I get for 'integration'.

Also, when people comment on my windows live feed, I'd like to see it in MSN messenger.

Anyway, waiting :)

SharePoint - ContentQueryWebPart, CommonViewFields and Multi-value choices

When you add a choice or lookup to the CommonViewField for a ContentQueryWebPart, if you had ticked the allow multiple-values checkbox, the CQWP will return you nothing.

Couple of people blogged about this:

http://sridharu.blogspot.com/2008/05/content-query-webpart-customization.html

http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx

Adri Verlaan [MSFT] even says:

Unfortunatly the data source that the CQWP uses does not support Mutli-Valued Lookups or Multi-Choice columns.

 

Turns out after a bit more digging around, you _can_ use multi-value choices.  To get multi-value choices to work, you need to use a different type:

Instead of Choice, use MultiChoice

<property name="CommonViewFields" type="string">MyDescription,PublishingHtml;MyTags,MultiChoice</property>

I have not had much luck with Multi-lookup and I suspect there might be some truth in what Adri was referring to.  If I consider how SharePoint might have to work with a field that contains multiple keys to a different lookup list, this problem becomes far more complex.

Anyway, at least it works for choice.

Have fun!

jliu

Windows Live configuration sync

I had this idea that popped up when I was listening to the current .NET Rocks - The Future of Web Development Panel.  I was listening to the panel lamenting about having to manually configure their development environment per machine that they use and thought, geez surely this can be solved perfectly with Windows Live.

Sure enough, within minutes of this idea popping in my head, one of the guys on the panel stated this, and got overwhelming applause.

That is one great idea.

So, you have Windows Live Mesh right now.  You can sync files, links and photos online.  How hard would it be to synchronize Visual Studio settings, office settings / templates, browser settings, etc etc

Taking the idea further, there is a set of tools you always use for your machine - wouldn't it be nice if you can re-use a license key (if it allows) across all your machines and share them via a Live Mesh account.

Or even when you build a new machine, a Life Mesh application automatically asks you if you want to re-install all your favourite tools that you had on your previous machine - tells you if it has a newer version (say for windows 7), and / or any driver requirements.

When you say "yes please", it will install these for you at a convenient time - AND copy your configuration settings so it'll behave JUST THE WAY you had it set up before!

Throw in some integration with Microsoft Online Store...

I can't stop drooling.  If someone don't build this app soon I will!

It is so great to live in a Software + Service world!  These are great times!