Posts

Showing posts with the label undocumented

c# script to delete very large second stage recycle bin items in sharepoint 2007

In SharePoint 2007, when item versioning is set to no limit for a document library, you could easily have a spiraling content database size.  When you try delete a ginormous item, it'll eventually get stuck in the second stage recycle bin, and you'll never be able to reclaim that database space or file space - a forced purging of the recycle bins through a UI operation will time out eventually, rolling back a huge transaction, probably freezing the site for your users - cue fire and brimstone. The solution is to run the following script off-hours.  Off hours helps minimize any potential blocks SQL server may issue against database pages as it goes around deleting the row content from alldocversions - from what I can tell, many I/O Page Latch locks are issued when SQL is deleting blobs, so to be nice to this script and run it off hours.  Compile it into a c# console application referencing the sharepoint dll. There isn't much for progress reporting included in the script...

San Francisco Trivia for Drupalers

A friend of mine was in town for the DrupalConSF and asked me about some San Francisco history. Thus it seems appropriate to publish some of the lesser known historical tidbits about SF that I've been meaning to resend out for awhile. Hope you enjoy & learn about SF, or use this in a drinking game/trivia night, etc. Credits to Stacey Irvine - an amazing and curious person - from Parody , of the Dive Bar Club fame. san francisco trivia The Questions Answers Why was Lawrence Ferlinghetti arrested in 1956 on obscenity charges? He published Alan Ginsburg's Howl Why was Abe Warner famous for his Cobweb Palace at Meig's Wharf? He refused to do anything to hurt a spider, including sweeping away cobwebs Why is San Francisco Sourdough unique, and can't be made elsewhere? The yeast that gives it that unique San Francisco flavor won't grow anywhere else Why is it said that Colma has more dead people than live ones? That's where all the cemet...

Default Document Content Type always loading as Document

Image
The problem statement is in MOSS 2007, when the user adds custom content types to an existing document library and then set them up to appear in the new document dropdown, MOSS still uses the default Document content type (though after saving, you can edit properties to set the correct content type - how undesirable!). Stephen Muller pointed me in the right direction for a fix, but mine differs slightly from his. Solution: Create a document library and set the default Document Template to None . i.e. do not select Microsoft Word, Microsoft Office Word 97-2003 template, etc. After the document library is created, do this within the Document Library Settings: Create Column s or Add from existing site columns go Advanced Settings > Allow managment of Content Types=Yes,    then Add from existing site content types then Change new button order and default content type and set the new content type up as #1 (for example)

secret lengths of OnBehalfReason

As I was setting up a custom SharePoint workflow to work with an external user outside of the domain, I noticed some quirky behavior and error messaging from SharePoint. e.g. it works if its a short piece of text like the MOSS 2007 SDK: createPartnerReviewTask_TaskProperties1.OnBehalfEmail = "null@void.com"; createPartnerReviewTask_TaskProperties1.OnBehalfReason = "This user does not have access to this Windows SharePoint Server site."; but dies like this when its too long: WinWF Internal Error, terminating workflow Id# 7c4d... System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties.set_OnBehalfReason(String value) what range is specified in the reference? undocumented.