SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Archive

Kategorien

Links

Andere Blogs



Add to Technorati Favorites

May 282009

SharePointConsole Updated

My SharePointConsole has some new commands.

If you don’t know it, it is a command line utility which allows you to perform some common tasks. Currently the theese commands are implemented:

  • EnumContentTypes
  • CreateContentType
  • RenameContentType
  • DeleteContentType
  • DeleteAllListItems
  • ShowInNewForm
  • ShowInEditForm
  • ShowInDisplayForm
  • DeleteAllVersions
  • RecycleAllVersions
  • SetTitleWithFilename
  • SetSearchCenterUrl
  • SystemUpdate
  • FeatureManager
  • EmptyRecycleBin

Download Download the SharePointConsole


Published: 5/28/2009  9:12 PM | 0  Comments | 0  Links to this post
Tagged as: Development, SharePoint

May 262009

Solution deployment fails

Deploying a SharePoint solution (.wsp file) to a SharePoint farm should be easy. Even if the farm contains 4 SharePoint Servers.

Just stsadm –o addsolution –filename solution.wsp. Some waiting so the deployment is done on every server, and we should be happy.

Well, the result was an Error in the solution status. Additionally the ULS log showed

Updating SPPersistedObject SolutionOperationStatus Name=SolutionOperationStatus Parent=SPSolutionLanguagePack Name=0. Version: -1 Ensure: 0, HashCode: 38896601, Id: 87c32e71-13f0-4d85-a215-29f1d180d239, Stack:    at Microsoft.SharePoint.Administration.SPPersistedObject.Update()     at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.SetOperationResult(SPSolutionOperationResult opResult, String msg, SPWebApplication webApp, Int32 updatesPerServer)     at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.DeployFilesInstallFeatures(SPWebApplication webApp, Boolean globalInstallWPPackDlls, Boolean installFeatures, Boolean force, Int32 tries)     at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.DeployLocalCore(Boolean globalInstallWPPackDlls, Collection`1 webAppl...

...ications, Boolean useAdminService, Boolean force)     at Microsoft.SharePoint.Administration.SPSolutionDeploymentJobDefinition.Execute(Guid targetInstanceId)     at Microsoft.SharePoint.Administration.SPTimerJobInvoke.Invoke(TimerJobExecuteData& data, Int32& result)

To get rid of the error, I went to the Timer Job definitions, and deleted the one which tried to add deploy the solution. The status went back to not deployed.

The reason for the Error was that the “Windows SharePoint Services Administration” was not stated on all SharePoint servers. After the services has been started, the deployment worked just as I expected it.

So make sure your Administration service is started, and running as System Account!


Published: 5/26/2009  11:04 AM | 0  Comments | 0  Links to this post
Tagged as: SharePoint, Solution

May 222009

Navigation for Wikis

image

The Wiki functionality SharePoint offers is great for quickly writing down stuff. It is often used for Server documentation.

Creating new pages is easy, and you can link pages. The ability to format the text is nothing fancy, but most of the time enough :-)

Uploading images can be done with my custom field type, which stores images and documents in existing libraries. After the upload, a link is inserted into the Wiki body. –> Custom Field – Upload Files and Images

Now I want to introduce the navigation for SharePoint Wikis.

I realized the navigation through a control adapter. It extends the history button, which is shown on every Wiki page. The advantage is, that the navigation will have to be activated only per web application. Every Wiki page within that web application then has a navigation control beneath the Quick launch. You can see the navigation in action in my Wiki.

How does it work?

The start page in a Wiki library is used as root for the navigation. The text “Wiki Navigation” is linked to this start page.

Every link on this start page which points to another Wiki page is followed to create the navigation tree.

The navigation is cached for 20 minutes. But if a page changes within this time, the navigation will be rebuild and cached automatically.

The Wiki Navigation uses the same CSS as the Quick launch TreeView. This way it does not break the layout, if a node text is too long.

If you Wiki was created from the Wiki site template, it will use the same page for the navigation root you see when you browser to your page (usually the home.aspx).
But if you created a Wiki library on e.g. an empty Teamsite template, the Navigation uses the first Wiki page it will find inside the Wiki library. This is usually the "How to use this wiki library" page. You have to manually delete this page, so the homepage is the page with the lowest ID (see in the url if you edit a Wiki page).

URL Parameters

The Wiki Navigation can take three URL Parameters, to change the way it renders the navigation.

  1. Refresh=true
    This parameter will clear the cached data, reload it and store it in the cache again
  2. ExpandDepth=x
    Controls the depth TreeNodes are expanded. The path to the currently selected TreeNode is always expanded.
  3. MaxLength=x
    Shorten the TreeNode text to this length and add “…”

Requirements

WSS and .NET 3.5 (SP1)

WSPBuilder Extensions for the Visual Studio if you want to user the source code

Installation

Add the solution via stsadm. Deploy it to the web application where you want to use the navigation. Then activate the web application feature.

Download

SharePoint Solution RH.WikiNavigation.wsp

Source code RH.WikiNavigation-Source.zip

Update 7/20/2009

Fixed a bug with Wiki Libraries created without the Wiki page template

Update 8/10/2009

More Trace output during feature activation/deactivation.
The control adapter is now available on every UrlZone configured in Alternate Access Mappings.


Published: 5/22/2009  9:02 AM | 15  Comments | 0  Links to this post
Tagged as: Development, Navigation

May 172009

nächste SharePoint UserGroup am 16.6. – Themen

Für die nächste UG haben wir die folgenden Themenvorschläge zusammengetragen.

  • Troubleshooting
  • Tools / Erweiterungen
  • TFS durchsuchen
  • SharePoint Designer
  • Entwicklung (Webpart, Eventhandler...)
  • InfoPath
  • Excel Services
  • Reporting Services

Eine Abstimmung habe ich auch eingerichtet. –> Abstimmung


Published: 5/17/2009  10:40 AM | 0  Comments | 0  Links to this post
Tagged as: UserGroup