Ashley
Blog - Robert Bogue [MVP]
Rob's Notebook
SharePoint Calendar
Thor Projects LLC - Welcome : Blog - Robert Bogue [MVP]
Tuesday, November 27, 2007

DotNetNuke and SharePoint -- An {EndBracket} response from Shaun Walker

Apparently Shaun Walker read my {End Bracket} article in MSDN Magazine.  He responded on his blog with You Should Learn DotNetNuke.

I have an appreciation for DotNetNuke -- it's definitely the right solutions for some clients/organizations.  In fact, when faced with the question about whether to setup SharePoint or DNN for the church I am a member of, I chose DNN.  I wanted to get a better understanding of DNN so I performed a technical edit of the Wrox title Beginning DotNetNuke Skinning and Design

I have a great deal of respect for DNN.  Most of my work -- because my clients generally deal with documents, and large scale sites -- is SharePoint.  However, DNN is a great alternative.


Categories: Professional | 0 Comments
 
 
Wednesday, November 21, 2007

SPFileCollection.Add(string, Stream, Hashtable)

If you're using one of the SPFileCollection overloads to create a file in SharePoint you'll find that there's a few overloads that take in a Hashtable for properties.  The key of the Hashtable can not be the GUIDs for the fields, they should be the internal names of the fields.

Categories: Professional | 0 Comments
 
Wednesday, November 21, 2007

SPContentType.Fields and SPContentType.Parent

A few random observations about SPContentType...

.Fields -- This isn't a complete collection of fields as it might be on SPList.  It's just the fields that are directly added to the content type.

.Parent -- This won't return you a null if there are no parents to this content type.  Instead it keeps returning you the same content type.  So rather than doing what you would normally do -- SPContentType.Parent == null -- to test to see if you're at the top content type, you must check SPContentType == SPContentType.Parent.  (or add .Id to each of these to make sure that you're getting an equality comparison rather than a reference comparison.)

You may notice that some of the core fields for SharePoint items aren't represented anywhere in the hierarchy (Author, Editor, Created, and Modified were the ones I noticed).

A final note is that even if a content type is activated in a site collection you may not be able to get to it from the SPWeb object of the current web site, so you get to walk the tree up to the root site in the site collection and pickup the reference from there.  Of course, you don't want to add it to the current SPWeb object because you'll get an error about a duplicate object.  (Apparently it exists, you just can't retreive it.)


Categories: Professional | 0 Comments
 
 
Wednesday, November 14, 2007

What I missed – MOSS Camp 2007 (Chicago)

There were many reasons to miss the MOSS Camp 2007 in Chicago that the MS DPE team hosted.  It conflicted with SharePoint Connections (which I didn’t attend) and TechED Europe (which I also didn’t attend).  The reason I didn’t make it was that I was supporting a Women’s Ministry candle light dinner at my church.  I committed to that before knowing about the MOSS Camp event.  It was held on 11/9/2007.

Larry Clarkin posted a report about how it went.  There were some “grievances” aired.  I want to respond to a few of them because I think that they could look at the problem from a better angle or they’re the result of some relatively simple errors.  In all honestly several others I don’t understand (Filtering views is not clear, having all fields available on contacts, etc.).  If someone wants to explain them to me perhaps I can dispel a few of them too.

1)      Column level security on lists – Another perspective on this is helpful.  How many people use column level security in their database?  (Does the word “none” come to mind?)  The real core issue here, the thing that’s absolutely missing is relationships between lists.  Two relationship types -- one-to-one and one-to-many relationships – would be a great help.  With a one-to-one relationship you can suddenly just put fields that you want to control access to in a separate table.  So I’m not saying that we don’t have issues here – we do, but the real problem – the one that the product team can solve and get more scenarios – is relationships.  By the way, as a workaround, it’s possible to set a field not to display on the display form and it’s possible to change the forms to your own forms so people don’t see those fields if they don’t need to.

2)      Impersonation testing – I can only assume people are having problems with the SPSecurity.RunwithElevatedPrivileges() call.  This is pretty common. Most of the time it’s someone trying to use SPContext.Current.Site (or SPContext.Current.Web).  These already contain the authentication information for the current user – you have to create your own instances inside the RunWithElevatedPrivileges call.

3)      HTML Editor – Yea, ok, the built in editor is weak.  However, Telerik offers their commercial RadEditor that can be dropped in as a replacement.  Or you can get the commercial version or the free lite version off the version selector page.  Admittedly Telerik’s site is impossible to navigate.  However, with those links you should be able to get everything you need.

4)      Lotus Notes Integration – This is one of those items that is on the line for me not understanding their point.  From my perspective, SharePoint should be used to replace Lotus Notes except where rich offline support is needed.  Notes can be searched and you can embed direct links to Notes documents if the client has Notes installed.  What else do you want/need?

5)      Relative links are broke(n) – Yea, they are.  Server relative links work.  Absolute links back to the SharePoint server are converted to server relative links and thus work across different access paths (think internally (server) vs. externally (server.mycompany.com))  Fully relative links don’t work, and here’s why:  You don’t know where the content will be displayed.  If I display it on the home page vs. on the listing page the path is different.  Thus the relative paths wouldn’t work.  So yes, the system totally strips them and you can’t prevent it from doing this.  That being said, server relative links can be used as a workaround if you plan correctly.

6)      WYSYWIG on Web Parts – Another perspective on this is helpful.  There isn’t a WYSYWIG for server controls either and people don’t complain about that – they user controls.  Web Parts are essentially sophisticated server controls.  So my response is use user controls wrapped in a web part.  There are public samples of how to do this all over the place.  The most famous is undoubtedly SmartPart.  Admittedly there are issues there.  However, I have a configuration management supported process that works well for this – I just haven’t had time to convert it into a book yet.  (If someone wants to engage me to show them how to do it I can.)

Two quick things I agree with:

1)      Service Unavailable Message – We need better control of error messages.  The 404 error is another example of this.

2)      XHTML Compliance –Some of this is fixable with new master pages and new page layouts – however, there’s some that can’t be fixed.  The ListViewWebPart and ListFormWebPart are tops on my hit list for this.  In addition to standards compliance issues, they hardcode attributes rather than using CSS.  (Check the output of a display form, you’ll find hardcoded cell widths.)

Feel free to send me mail on this if you don’t agree – or you need more details.


Categories: Professional | 0 Comments
 
Monday, November 05, 2007

Windows SharePoint Services Search – No Results and Errors

I had a client who has WSS.  They weren’t seeing any search results.  There were also some errors being logged on the server the most prevelant of which was:

 

Event Type:        Warning
Event Source:    Windows SharePoint Services 3 Search
Event Category:                Gatherer
Event ID:              2436
Date:                     11/5/2007
Time:                     10:00:03 AM
User:                     N/A
Computer:          SERVER
Description:
The start address <sts3://server/contentdbid={70792d37-74fc-430d-8939-d55afebdb795}> cannot be crawled.

Context: Application 'Search index file on the search server', Catalog 'Search'

Details:
                The object was not found.   (0x80041201)

The reason for the error … the server couldn’t reach the web application on its default URL.  Once I changed the alternate access mappings so that the default URL was reachable from the server and issued a command to start a full search (see below), it finally indexed things correctly.  The command to force a full crawl is:

STSADM –o spsearch –action fullcrawlstart


Categories: Professional | 2 Comments