Archive for July, 2008

Caution When Packaging Themes for SharePoint Products and Technologies

Posted in Sharepoint Server, Windows Sharepoint Services on July 21st, 2008 by Alonso Robles – Be the first to comment

Last month, I wrote up a post about how to package themes in a WSS 3.0 Solution Package (WSP file) for deployment on a SharePoint farm. After playing with this package a bit there was on problem that I encountered that was pretty obvious but I failed to take into consideration. The problem was that the SPTHEMES.XML and the OOB_SPTHEMES.XMLfiles that were packaged were deleted when I retracted and deleted the solution. Afterwards, I began to experience strange behavior with themes in my SharePoint environment.

Why did this happen?

A few months ago, I explained how WSS deploys and retracts solution packages. In that explanation, I explored how the WSS run-time checks the solution manifest of the solution package (WSP file) and removes any files, features, and other solution components from the file system and content databases. This includes both the SPTHEMES.XML and OOB_SPTHEMES.XML files that were specified in the solution manifest of the theme package. Take a look at the bold-ed lines in the manifest excerpt below:

<?xml version=1.0encoding=utf-8 ?>
<Solution xmlns=http://schemas.microsoft.com/sharepoint/
         
DeploymentServerType=ApplicationServer
         
ResetWebServer=TRUE
         
SolutionId=D250636F-0A26-4019-8425-A5232D592C10>
 
<TemplateFiles>
 
<TemplateFile Location=LAYOUTS/1033/SPTHEMES.XML/>
 
<TemplateFile Location=LAYOUTS/1033/OOB_SPTHEMES.XML/>
 
<TemplateFile Location=THEMES/MYNEWTHEME/MYNEWTHEME.INF/>
 
<TemplateFile Location=THEMES/MYNEWTHEME/mossExtension.css/>
 
<TemplateFile Location=THEMES/MYNEWTHEME/theme.css/>
 
<!–Additional images and icons (gif, jpg, png files)
      
can be added here using <TemplateFile> elements –>
 
</TemplateFiles>
</Solution>

So when I retracted my theme solution, both the SPTHEMES.XML and OOB_SPTHEMES.XMLfiles were deleted from the file system and the original SPTHEMES.XML was not restored. Luckly, I had a copy of the themes WSP file from which I extracted the OOB_SPTHEMES.XML file and manually copied back to the 12/LAYOUTS/1033 directory. This resolved the odd theme behavior that my environment was experiencing.

Lesson learned?

If you are going to modify files in the SharePoint HIVE in an unsupported manner (such as was the case with the theme package), make sure you have a back up of the original file system files. Like we did with the OOB_SPTHEMES.XML file and make a note on additional steps, aside from solution retraction and deletion, that need to be taken to restore the file system to it’s original state. This means don’t just test the deployment, but also the retraction process before using this type of solution in a production environment.

Introduction to the Enterprise Search Query Object Model

Posted in .NET Framework, Sharepoint Server on July 15th, 2008 by Alonso Robles – Be the first to comment

I had the pleasure of delivering a presentation tonight at the monthly Los Angeles SharePoint User Group. The talk provided an introduction to the enterprise search query object model which is used by Microsoft Office SharePoint Server 2007 (MOSS) and Microsoft Search Server 2008 (MSS) to provide search results to search queries. The guts of the 30 minute slide deck [PPTX | PDF] consisted of a quick overview of Microsoft’s enterprise search architecture, followed by quick comparison of the keyword syntax and the SQL-based syntaxused for querying the query engine, and ended with an overview of the KeywordQuery and FullTextSqlQuery classesand their commonly used properties. After the slides, I spun up a virtual machine and demonstrated the classes at work with some sample code [ZIP]. The talk ended with crediting Patrick Tisseghem and his book, Inside Microsoft Office SharePoint Server 2007, where I first started learning about search query object model.

If you missed the presentation, feel free to take a look at the materials:

Oh, and there is one more excellent resource that I forgot to include in the slide deck is the Enterprise Search Team Blog.

Presenting at the Upcoming Los Angeles SharePoint User Group (LASPUG) Meeting – July 15, 2008

Posted in Sharepoint Server on July 14th, 2008 by Alonso Robles – 1 Comment

I will be doing a brief presentation tomorrow for the Los Angeles SharePoint User Group (LASPUG). My presentation will consist of a quick overview on some of the key classes avialable in the Search Query object model and a breif demonstration on how to use them. The meeting is virtual so you can attend from anywhere in the world. Feel free to check it out.