Thursday, December 15, 2005

Problems editing a page in FrontPage

We have been having a problem at one of our clients. What was going to be an easy update using Frontpage, became a 6 hour banging head against wall, us-against-FrontPage battle.

The problem:
Open the WSS site in FrontPage 2003. Open the Default.aspx page.
Frontpage displays the following error:

"The server could not complete your request. Contact your Internet service provider or web server administrator to make sure that the server has the frontpage server extensions or sharepoint services installed."
  • We removed FrontPage 2002 Server Extensions from the box
  • We upgraded to WSS SP2
  • We restarted IIS
  • We restarted the server

Nothing. The following Microsoft KB gave us a hint:
http://support.microsoft.com/kb/830342/

There were no custom web parts on our page, so it wasn't too obvious. However, when we looked in the Web Part Page Gallery we found a web part with an error. We dragged it on to the page, then deleted it (thus removing it from the web part page gallery).

That was it! FrontPage-Nil, Us-One

Friday, August 26, 2005

Sydney SharePoint User Group

Do you live in Sydney and work with SharePoint? Then you shouldn't miss the SharePoint User Group sessions. Not only do you get free beer and pizza, but you also get to meet others in the SharePoint community and get an update on what is going on.

Meetings are on the third Tuesday of every month, just off Hyde Park at "Y On the Park", Wentworth Avenue.

Details are on http://sps.uniqueworld.net/sydney.

If you are in Melbourne or Canberra, you don't have to feel left out:
http://sps.uniqueworld.net/Canberra
http://sps.uniqueworld.net/Melbourne

Wednesday, August 24, 2005

Site Definitions

I've just started to play around with Site Definitions. I was forced into it, because I need to create a template for a Portal Area, and that is the only option available to me. But now I can really see the power of them. Once you get used to them, you can do so much. I always wondered how I could create my own custom view, and now I know.

My main tool at this stage is FrontPage to edit the XML, and the SharePoint SDK to find out what each of the tags really means. There is quite a lot of trial and error at these early stages, but results are being reaped. My current little problem is that I have defined a document library, in my site definition. It gets created when I create a new area using my template. All fine. But if I try to create a web part page, I cannot save it to this document library! My library doesn't show up in the dropdown list of locations that I can store my new page. Strange.

If I add a new DL after the area has been created, I can save it there.

Update: To resolve this issue, I needed to upate the following file:
Common files\Microsoft Shared\Web Server Extensions\60\Template\Layouts\1033\spcf.aspx

Down around line 300, there is some Javascript that controls what document library types are available in the drop down list of save locations.

Here is the original condition in the code:
if ((!spList.Hidden) && (spList.BaseType == SPBaseType.DocumentLibrary) && (spList.BaseTemplate == SPListTemplateType.DocumentLibrary))

I modified the condition to also include the TemplateID for my custom document library (200):
if ( ((!spList.Hidden) && ((spList.BaseType == SPBaseType.DocumentLibrary) ((int)spList.BaseType == 200))) && ((spList.BaseTemplate == SPListTemplateType.DocumentLibrary) ((int)spList.BaseTemplate == 200)) )

Too easy! So the problem really is that by default, SharePoint only lets you save web part pages to document libraries with a base template type of SPListTemplateType.DocumentLibrary. Therefore, if you are defining your own document library as part of your site definition, and you want to easily create web part pages in it, you will have to do a similar update.