Skip to main content

B@rney's Blog

Go Search
Home
Blogs
  

 B@rney

B@rney
View Bjarne L. Gram's profile on LinkedIn
Other Blogs
There are no items in this list.
sharepointdemo.biz > Blogs > B@rney's Blog
B@rney's blog on SharePoint, SharePoint and ...
User Profile Picture Library

Do you need to simplify management of MOSS User Profile Pictures?
Steven Van de Craen has the solution!
He's created en Event Handler for a Picture Library that parses the filename of the uploaded image, and if it matches a username it updates that user's User Profile with the URL to the Picture Library.

Itay Shakury has created a WSP for this: Profile Picture Library.

I had some trouble getting this to work, I got this in the Event Log:

Event Log

After digging into the source, I found that Steven was using:

SPSecurity.RunWithElevatedPrivileges

Several people had blogged about issues doing this, but Steven's code looked like it was taking these issues into account, it should work!

After a while I got an idea, maybe the AppPool Account my Web App was running under didn't have the appropriate user rights on the SSP?

 

I granted the account Manage User Profiles - and now it worked!

Manage User Profiles

Technorati Tags: ,

Lost my site creation metadata! - Solved

When you click Create Site, some of the fields are related to listing the site in the SiteDirectory, like Department and Location. These are actually retrieved from the SiteDirectory and displayed in an IFrame!

 

At a customer location these were lost!

 

Event though I don't know how or why this happened, the solution was simple...

 

Click Site Actions | Site Settings | Modify All Site Settings

  1. If you're not at the "top" - click  Go to top level site settings.
    Top level site settings
  2. Choose Site directory settings
    image
  3. Enter the  Site Directory Path - usually /SiteDirectory
    Site Directory Location

And OK - that's all, it's back!

 

Technorati Tags: ,
Content and Structure reports not working

One of my customers had an issue, the Content and Structure reports were not working.

I did *a lot of* Googling, and finally came across Marc's post here:

http://mexicanratdog.wordpress.com/2008/02/19/sharepoint-content-and-structure-reports-not-showing/

Marc had a similar issue, so I tested his Command Line App and found the same issue:
sitecollectionreportslist.exe

So I fired up SharePoint Manager 2007 and found the GUID for SiteCollectionReportsList:

SharePoint Manager 2007

Then I used sitecollectionreportslist.exe to set this GUID - and VOILA now the reports are working again!

 

[UPDATE!]

Hmm, I was a bit too fast here - seems this didn't do the trick anyway...

 

So I checked the errormessage, now it was:

The given key was not present in the dictionary.   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Microsoft.SharePoint.Publishing.PublishingWeb.get_VariationRelationshipsListId()
   at Microsoft.SharePoint.Publishing.Internal.VariationSettings.get_GlobalRelationshipList()
   at Microsoft.SharePoint.Publishing.Internal.VariationSettings.GetVariationRootPublishingWebUrlFromRelationshipList()
   at Microsoft.SharePoint.Publishing.Internal.VariationSettings.get_RootPublishingWebUrl()

 

So I checked SharePoint Manager again, and found a List named Relationships List on the root Web. From there I copied the GUID to this list. I figured that this was also a property on the root web's AllProperties collection that wasn't set. So i modified Marc's code to get and set this ID. But to find the propertyname I had to use Lutz Roeder .NET Reflector on the Microsoft.SharePoint.Publishing.dll, and here I found:

 
internal Guid VariationRelationshipsListId
{
    get
    {
        Guid empty = Guid.Empty;
        CacheManager manager = CacheManager.GetManager(this.Web.Site);
        if (this.allWebProperties == null)
        {
            CachedArea tryGetRootArea = manager.ObjectFactory.TryGetRootArea;
            if (tryGetRootArea != null)
            {
                string str = tryGetRootArea.Properties["_VarRelationshipsListId"].ToString();
                if (!string.IsNullOrEmpty(str))
                {
                    empty = new Guid(str);
                }
            }
        }
        if (!(empty == Guid.Empty))
        {
            return empty;
        }
        return this.GetGuidProperty("_VarRelationshipsListId", Guid.Empty);
    }
    set
    {
        this.SetGuidProperty("_VarRelationshipsListId", value);
    }
}

 

So, the property is named _VarRelationshipsListId, and I used this in my code to get and set this value.

 

After modification, Marc's code looked like this:

 

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Text;
   4:  using Microsoft.SharePoint.Publishing;
   5:  using Microsoft.SharePoint;
   6:   
   7:  namespace VariationRelationshipsList
   8:  {
   9:    class Program
  10:    {
  11:      private const string KEY_VariationRelationshipsList = "_VarRelationshipsListId";
  12:      private const string PARAM_VariationRelationshipsListId = "-setVariationRelationshipsListId";
  13:      private const string PARAM_Help = "-help";
  14:      private const string PARAM_Url = "-url";
  15:   
  16:      static void Main(string[] args)
  17:      {
  18:        List<string> lstArgs = new List<string>(args);
  19:        if (lstArgs.Contains(PARAM_Help) || lstArgs.Count == 0)
  20:        {
  21:          PrintHelp();
  22:          return;
  23:        }
  24:        if (lstArgs.Contains(PARAM_Url))
  25:        {
  26:          int indUrlFlag = lstArgs.IndexOf(PARAM_Url);
  27:          if (lstArgs.Count > indUrlFlag + 1)
  28:          {
  29:            string siteUrl = lstArgs[indUrlFlag + 1];
  30:            try
  31:            {
  32:              using (SPSite site = new SPSite(siteUrl))
  33:              {
  34:                if (!PublishingSite.IsPublishingSite(site))
  35:                {
  36:                  Console.WriteLine("Site must be a publishing site");
  37:                  return;
  38:                }
  39:                PublishingWeb pWeb = PublishingWeb.GetPublishingWeb(site.RootWeb);
  40:                GetVariationRelationshipsListInformation(pWeb);
  41:   
  42:                if (lstArgs.Contains(PARAM_VariationRelationshipsListId))
  43:                {
  44:                  SetVariationRelationshipsList(lstArgs, pWeb);
  45:                }
  46:              }
  47:            }
  48:            catch (Exception ex)
  49:            {
  50:              Console.WriteLine(ex.ToString());
  51:            }
  52:          }
  53:        }
  54:      }
  55:      private static void GetVariationRelationshipsListInformation(PublishingWeb pWeb)
  56:      {
  57:        if (pWeb.Web.AllProperties.ContainsKey(KEY_VariationRelationshipsList))
  58:        {
  59:          string result = pWeb.Web.AllProperties[KEY_VariationRelationshipsList].ToString();
  60:          Console.WriteLine(string.Format("Reports List ID: {0}", result));
  61:   
  62:          Guid listID = new Guid(result);
  63:          SPList reportsList = null;
  64:          try
  65:          {
  66:            reportsList = pWeb.Web.Lists.GetList(listID, false);
  67:          }
  68:          catch (Exception) { }
  69:          if (reportsList == null)
  70:          {
  71:            Console.WriteLine("Variations Relationships list could not be found at given GUID");
  72:          }
  73:          else
  74:          {
  75:            Console.WriteLine("Variations Relationships list was found at given GUID");
  76:          }
  77:        }
  78:        else
  79:        {
  80:          Console.WriteLine(KEY_VariationRelationshipsList + " property was not set on the current site");
  81:        }
  82:      }
  83:      private static void SetVariationRelationshipsList(List<string> lstArgs, PublishingWeb pWeb)
  84:      {
  85:        int indSetReportListIdFlag = lstArgs.IndexOf(PARAM_VariationRelationshipsListId);
  86:        if (lstArgs.Count > indSetReportListIdFlag + 1)
  87:        {
  88:          string newVariationsRelationshipsListId = lstArgs[indSetReportListIdFlag + 1];
  89:          //check to make sure this list actually exists
  90:          SPList newList;
  91:          try
  92:          {
  93:            newList = pWeb.Web.Lists.GetList(new Guid(newVariationsRelationshipsListId), false);
  94:          }
  95:          catch (Exception)
  96:          {
  97:            Console.WriteLine(string.Format("Could not find new list: {0}", newVariationsRelationshipsListId)); ;
  98:            return;
  99:          }
 100:          Console.WriteLine(string.Format("Setting new variations realtionships list id: {0}...", newVariationsRelationshipsListId));
 101:          if (!pWeb.Web.AllProperties.ContainsKey(KEY_VariationRelationshipsList))
 102:            pWeb.Web.AllProperties.Add(KEY_VariationRelationshipsList, newVariationsRelationshipsListId);
 103:          else
 104:            pWeb.Web.AllProperties[KEY_VariationRelationshipsList] = newVariationsRelationshipsListId;
 105:          pWeb.Web.Update();
 106:        }
 107:      }
 108:   
 109:      private static void PrintHelp()
 110:      {
 111:        Console.WriteLine(string.Format("{0} <http://.... the url of the site collection to target>", PARAM_Url));
 112:        Console.WriteLine(String.Format("[{0}] <the guid of the list to which the Reports List property for the site should be set>", PARAM_VariationRelationshipsListId));
 113:      }
 114:    }
 115:  }

 

And, after running this handy little app - Content and Structure (SiteManager) is back online!

Thanks Marc!

 

Technorati Tags: ,,

SharePoint Community Meeting on usability and visual experience

IMAGE_026Yesterday we had the second meeting in the Norwegian SharePoint Community. The objective was usability and visual experience. We had some great speakers delivering just what our members wanted! 100 people where physically at the conference, and another 40 joined in on Live Meeting!

 

 

 

 

 

 

 

Live MeetingThe broadcast on Live Meeting was accompanied by video from a Microsoft Roundtable video conferencing camera. One window showed whoever was speaking at the moment (voice activated) and another window showed a 360 degree panorama view of the audience and speakers. At the same time we could see the PowerPoint presentation - great!

 

Wish you were there?

Watch the recording here:

https://www112.livemeeting.com/cc/microsoft/view?cn=&id=WSPNZ4&pw

 

Technorati Tags: ,,
SharePoint 2007 redirect solved: using 301 instead of 302 redirects - Waldek Mastykarz

Want search crawlers to index your SharePoint sites? Follow Waldek's lead and use 301 instead of 302...

SharePoint 2007 redirect solved: using 301 instead of 302 redirects - Waldek Mastykarz

Fully booked - Norwegian SharePoint Community is a success!

Today at 16:00 (GMT+1) we'll be arranging the second meeting in the Norwegian SharePoint Community. We had 110 seats fully booked the first time, and it's the same today!

I guess we can call this a success story for a SharePoint Community!

SharePoint Developer MSDN Web Cast Series

Are you a ASP.NET Developer? Do you wanna learn how to do SharePoint developement? Take a look at these MSDN Web Casts!

 

Paul Andrew : SharePoint Developer MSDN Web Cast Series

Microsoft Customer Segments

I just got the question: ”What does CAS mean?”, it was in context of different Microsoft Customer Segments, like UMM (Upper Mid Market).

So I went and asked the Google-man:
http://www.google.com/search?hl=en&q=site:microsoft.com+umm+cas

And found a PowerPoint slide deck that had it covered:

cas

Telerik ImageManager for SharePoint

I just got feedback from Telerik support that the RadEdit for AJAX will be released in a version for MOSS!

That's great - finally a feasible substitute for the built in ImagePicker!

 

Check out the RadEditor - codename Promethus - here.

 

Promethus

 

Here's the answer from Telerik Support:

 

From: telerik
Date: 5/8/2008 9:06:59 AM

Hello Bjarne,

We are about to release a RadEditor for AJAX version for MOSS. The development is nearly complete, and it should be released by the end of May - slightly after the Q1 SP1 scheduled for May 15th.

Since at present the RadEditor for AJAX features an ImageEditor dialog (please check this example: http://www.telerik.com/demos/aspnet/prometheus/Editor/Examples/XhtmlValidatorTrackChangesFormatCodeBlockDialogs/DefaultCS.aspx) - open the ImageManager, select an image and click on the "Image Editor" button - you will also be able to use this into the MOSS version once it is out.

I hope this helps,
Tervel
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center

 

Technorati Tags: ,,,,
New meeting in Norwegian SharePoint Community

We're ready for the next meeting in the Norwegian SharePoint Community.

To attend click here.

Description in Norwegian:

Hvordan forbedre brukskvalitet og visuell opplevelse i SharePoint løsninger

Velkommen til nytt gratis seminar i NSC - Norwegian SharePoint Community, denne gangen med fokus på brukskvalitet og visuell opplevelse. SharePoint har kanskje verdens beste funksjonalitet, men kanskje ikke verdens beste brukskvalitet?

Vi har samlet erfaringer fra store SharePoint prosjekter der det er gjort vesentlig jobb knytet til forbedret brukskvalitet og grafisk design.

Agenda

16:00 Registrering

16:15 Foredrag 1

17:00 Foredrag 2

17:45 Pause med lett servering

18:15 Foredrag 3

19:00 Q & A

19:30 Avslutt

Du trenger ikke være tryllekunstner for å gjøre SharePoint brukervennlig. Du må bare vite om tryllefunksjonalitetene. - Anita Jenbergsen, Interaksjonsdesigner i Bouvet

Hun er en journalist og innholdsprodusent på selskapets intranett. Hun er vant til å bruke Office produktene og kjenner Word og Excel ut og inn, og selvfølgelig Photoshop for bilderedigering. Dessuten kjenner hun til selskapets gamle egenutviklede publiseringssystem.

Så møter hun SharePoint. Hun skal publisere en artikkel hun har skrevet ferdig i word. Hvor skal hun begynne? Hvor er knappen for å opprette ny side? Skal hun velge site eller page? Så skrev hun ferdig artikkelen på en page, sjekket inn og gikk til lunsj. Artikkelen er klar for publisering, men hvor ble den av?

Brukertester og tilbakemeldinger fra kunder går ofte på at SharePoint out-of-the-box er langt fra en brukervennlig publiseringsløsning. Bare det å komme i gang er slett ikke intuitivt for brukeren. - Hvor er knappen for å opprette ny side? Skal jeg velge site eller page mon tro? Hvor ble det av artikkelen jeg nettopp skrev, den som akkurat var klar til publisering? Hvordan skal jeg få oversikt over artiklene mine når det er så mange av dem? Hvorfor så mange klikk og skjermbilder? Hvordan kan jeg vite at jeg må lukke vinduet jeg befinner meg i for å kunne fortsette prosessen? Hvordan, hvordan, hvordan??

Det er mulig å gjøre SharePoint til et enklere, raskere og en mer motiverende løsning å bruke. Bouvet har i samarbeid med Microsoft og StatoilHydro utviklet noen nye og forbedrete funksjonaliteter for SharePoint 2007 som er implementert på StatoilHydro.com. Vi vil i denne presentasjonen vise noen av de grepene vi har gjort for å forbedre brukervennligheten sik at den er mer motiverende å bruke; gjenfinning er enklere, og å legge inn bilder har blitt mer effektivt.

"You can't go wrong with beige" – Kristin Halvorsen, Rådgiver og CKO i Objectware

Web er etterhvert blitt den viktigste kanal for kommunikasjon og samhandling, Enten om det nå dreier seg om intern kommunikasjon for å bygge kultur, koordinere og samhandle, effektivisere prosesser, dele kunnskap - utvikle ny kunnskap! Eller om det dreier seg om ekstern kommunikasjon hvor fokus kan være merkevarebygging, salg, rekruttering og/eller effektiv samhandling med kunder og leverandører. For å nå disse målene er brukeropplevelse en viktig suksessfaktor. Foredraget presenterer teori, forskning og verktøy for å sikre god brukeropplevelse. Erfaringer fra reelle SharePoint-prosjekter trekkes inn som eksempler.

Hva koster et nytt visuelt grensesnitt i SharePoint? – Ine Pettersen, Frontendutvikler i Bouvet

Hva er viktig å vite når man skal lage nytt utseende på en SharePoint løsning? Hvilket design er mulig å implementere, hvilke utfordringer har vi møtt og hvordan kan det gjøres. Vi gjennomgår erfaringer fra både intranett og internett løsninger, med eksempler fra StatoilHydro.com, intranettet til Wilh. Wilhelmsen (WW) group og intranettet til solcelle produsenten REC - Renewable Energy Corporation.

1 - 10 Next

 ‭(Hidden)‬ Admin Links