Breadcrum names not correct on postback

Jan 30, 2009 at 5:35 PM
I have noticed a really strange problem. Haven't really noticed this before but when I hit links like next/prev/a page number/sort on date/sort on relevance then the names aren't updated.
It seems like either the connection between them dosen't work on these events or that faceted webpart dosen't handle update correctly. If I have a result that has the wrong names, like DETECTELANGUAGE 9, and click the url and push enter the page is reloaded and it shows the correct name. Also if I hit the searchbutton again it works as well. Its only when I click these things. They all have urls with javascript with PostToUrl.

I have the same problem on three diferent systems.
Jan 30, 2009 at 8:14 PM
In 2.5 Bread Crumbs rely on GET requests (urls) only and don't extend to post backs (paging). BTW, that's default behavior for web part connections in WSS3.0. Paging will be resolved in 3.0 in both standard and advanced searches.
Feb 5, 2009 at 11:01 AM
I have now created a fix for this as well.
The solution is to have the facet column xml in breadcrumbs as well. And as fall back if no connection found the names are fetched from this instead.

How to fix:
In file SearchBreadCrumbs.cs after region Visual Settings add this:
/// <summary>
        /// Selected columns are defined as managed properties and will be available as search facets.
        /// The columns must be crawled and set as managed properties in the SSP administration.
        /// </summary>
        /// <remarks>Test against existing managed properties is built-in, however a proper exception propagation is still required.</remarks>
        /// <permission cref=""></permission>
        public string SelectColumns {
            get {
                return _selectColumns;
            set {
                _selectColumns = value;

Then add this method in region Private Methods:
/// <summary>
        /// Fetches column names from local xml
        /// </summary>
        private void FixColumns() {
            if (!_connected) {
                XmlDocument doc = new XmlDocument();
                _xmlColumns = doc.DocumentElement;
                _connected = true;

Then find this method: PopulateCrumbTable
And change this to:

   private void PopulateCrumbTable()
            foreach (string prop in _properties)
            { ....

Then on your webpart page add the same columns xml as you have in the faceted search webpart to the breadcrumb webpart. After this all postbacks works as well. Just remember to update both xmls when you make changes.