The KM Application Template

I'm having a go with the Knowledge Management Application Template.  I would strongly suggest that, before you deploy one of these, that you fix the typographical error in the description of the Keywords list.  I think it should say:

Use this list to manage the keywords used to tag items in your Knowledge Base

One thing, as software developers, we're stereotyped as having less than total command of our native language.  I've always thought stereotypes become stereotypes for a reason.

-robot

Blank Page

Drop this in a Content Editor Web Part on a web part page in a team site and see what happens:

<STYLE TYPE=”text/css”>
.ms-bannerContainer{Display:none}
.ms-bannerframe{Display:none}
.ms-bodyareaframe{Border:0}
.ms-bodyareapagemargin{Display:none}
.ms-globalbreadcrumb{Display:none}
.ms-globalleft{Display:none}
.ms-globalleft{Display:none}
.msgloballinks{Display:none}
.ms-globalright{Display:none}
.ms-globalTitleArea{Display:none}
.ms-navframe{Display:none}
.ms-pagebottommargin{Display:none}
.ms-pagebottommarginleft{Display:none}
.ms-pagebottommarginright{Display:none}
.ms-pagemargin{Display:none}
.ms-pagetitle{Display:none}
.ms-sitetitle{Display:none}
.ms-titlearea{Display:none}
.ms-titleareaframe{Display:none}
.ms-titlearealeft{Display:none}
.ms-titlearearight{Display:none}
.ms-titleimagearea{Display:none}
</STYLE>
<A href=”java*script:MSOLayout_ToggleLayoutMode()” mce_href=”java*script:MSOLayout_ToggleLayoutMode()”>Toggle Edit</A>

Take the “*” characters out of the word “java*script and don’t forget the colon after the word “java*script”.

Also, be sure to set the chrome on your CEWP to none.

I find this Interesting.

 -robot

WSS and RSS

If we're only running WSS and not the MOSS components, we don't get the RSS Viewer web part.

So we have to build our own out of the XML viewer web part and then we have to have an XSLT to render the feed's XML on screen.

So, I'm have a little trouble with this.

First, I've got a custom list called MyList with just an Item Title column and a Description column.

Now, under List Settings I check the RSS Settings.  If RSS isn't allowed at the Site, Site Collection or WebApp level in Central Admin, you won't see the RSS Settings for the list.

So RSS is allowed and I'm checking Select All columns and click OK.

I'm back at my list and I click on the Actions menu.  I select View RSS Feed and I get the pretty rss feed page with a URL that looks like: http://MyServer/_layouts/listfeed.aspx?List=<some guid>.

So, I copy the URL to the feed to my clipboard and I move to a web part page and add an XML Viewer web part.  I open the tool pane and paste my URL in the XML Link field and click OK.

What I end up with is a style-free version of the pretty rss feed page inside my web part.  So, at this point, I simply need to transform my XML with and XML Style Sheet also called an XSLT.

OK, the simplest XSLT I've been able to come up with looks like this:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:for-each select="rss/channel/item">
<a href="{link}">
<xsl:value-of select="title"/></a>
<BR/>
<xsl:value-of select="pubDate"/>
<BR/><BR/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

So, since my problem is that I get the pretty rss feed page instead of the real XML, I now have to guess what's going on.  And my guess is this:

  1. For some reason, I have to browse out to http://www.w3.org/1999/XSL/Transform and get version "1.0".  I don't get that part but it's required.
  2. Then I do this xsl:template thing that matches "/".  I guess I'm going to build within this template something related to the root of my XML file.
  3. Next, I do this xsl:for-each thing that selects "rss/channel/item" which, I suppose, lives at the root of my XML file.  Inside, this for each, I'll get code repeated each time an "item" is encountered.
  4. Inside this for-each node, I'm going to create an anchor tag with a magical {link} href and use the "title" column to provide the text for the link.  Then, I'm going to insert a line break and add the contents of the "pubdate" field as text.  Then, I'm going to do two line breaks to skip a line between items.

The text in my webpart looks like this:

Item Four
Thu, 13 Dec 2007 16:28:49 GMT

Item Three
Thu, 13 Dec 2007 16:28:40 GMT

Item Two
Thu, 13 Dec 2007 16:28:31 GMT

Item One
Thu, 13 Dec 2007 16:28:21 GMT

Perfect.

Except for two things.

First, I'd like to get my description to appear.

Second, I don't have a "title" or a "pubdate" column in my list.

The description is easy.  I just add this to my XSLT:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:for-each select="rss/channel/item">
<a href="{link}">
<xsl:value-of select="title"/></a>
<BR/>
<xsl:value-of select="description">

<BR/>
<xsl:value-of select="pubDate"/>
<BR/><BR/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

So this works, but not as expected.  Apparently, the rss feed generates all the content into the "description" node. because I get four items that look like this:

Item Four
<div><b>Description:</b> Description for Item Four</div> <div><b>Content Type:</b> Item</div> <div><b>Created:</b> 12/13/2007 11:28 AM</div> <div><b>Created By:</b> MyServer
obot</div> <div><b>Item Title:</b> Item Four</div> <div><b>Modified:</b> 12/13/2007 11:30 AM</div> <div><b>Modified By:</b> MyServer
obot</div> <div><b>Version:</b> 1.0</div>
Thu, 13 Dec 2007 16:28:49 GMT

I also note that it matters that I use the "description" selector and not the "Description" selector; apparently it's case sensitive.

So, even though I included all my fields, I can't get my Description field and I can't seem to get any of the other fields like "Created" or "Modified By".  I usually end up with a blank line there, given that I used a <BR/> tag.  In fact if I try a field with a space in too, like "Modified by" the XSLT blows up completely giving me the helpful bit of advice:

The XSL specified by the XSL property or XSL Link property is not valid, or the XSL file cannot be accessed. Make sure you have specified a valid XSL style sheet for this Web Part, or if the XSL file is linked that it can be accessed by the server. For assistance, contact your site administrator. More about making XSL files accessible

Needless to say, I do not recommend you try the "More about" link.

It seems like, if I could see the XML that the rss feed generates instead of that pretty rss feed page, if i could see the raw XML, I'd be able to figure out how to work down the nodes to the item node and then get the values out of the my columns.

So, if you're follwoing along, you know we can just save our pretty rss feed page as an XML file and I've opened mine in FrontPage and see that all I will ever get from my list is the title, pubdate, author and such while the real data, like my item's Description (with a capital "D") is all rolled into an XML "description" node that uses a ![CDATA operator and parses all my item data into a single field that looks like HTML but it's really just text.  So, really, any hope of having an RSS feed generate something intelligent like an item and it's description are looking pretty remote.

grrrr…

-robot

 

Importing SharePoint Sites

We've had a few reps through the export routine and we can stuff a site into an export file pretty easy with the stsadm.exe program and a command like this:

stsadm.exe -o export -url http://MySharePointHost/MySite -filename \MySharePointHostexportsExportFile.exp

But, on a MOSS server, when I try to import the site to a new URL, I use this command:

stsadm.exe -o import -url http://MySharePointHost/MyOtherSite -filename \MySharePointHostexportsExportFile.exp

And I get this error:

The site http://MySharePointHost/MyOtherSite could not be found in the Web application
SPWebApplication Name=MyWebApplication Parent=SPWebService

So I'm wondering ,huh?  And so I create a web site at the URL I'm using but I use a different template so I can tell the difference and try again getting this error:

Cannot import site.  The exported site is based on the template MySiteTemplate but the destination site is based on the template MyOtherSiteTemplate.  You can import sites only into sites that are based on the same templaqte as the exported site.

I rework my import command one more time to use a URL under my /SiteDirectory/ folder of my portal like this:

stsadm.exe -o import -url http://MySharePointHost/SiteDirectory/MyOtherSite -filename \MySharePointHostexportsExportFile.exp

And this time it works.  It seems odd but I guess SharePoint has better control over that SiteDirectory folder.

hth

-robot

The template you have chosen is invalid or cannot be found.

Site templates are great ways to support a business process because you can write all of the documents and instructions into one place and then install it where ever it's needed.

But, sometimes site tempates are not perfectly portable and SharePoint makes it hard to figure out what the problem is.

So, under my My Site in a MOSS environment, I created a site using the blank site template.  I exported the site as a template and copied the .stp file to my hard drive.  Then I uploaded it into a different WSS server site template gallery. 

So I cerate a new site, select the new site tempate and, rats:

The template you have chosen is invalid or cannot be found.

The good news is get that link that says:

Troubleshoot issues with Windows SharePoint Services.

What is the point of that POS?  It's just there to make it take longer for new people to figure out what their problem is.  Does anyone ever click that link?

One thing I did was check the site's features.  Originally, the site had a translation feature that's not installed on the target host but I disabled that feature and now I just get the error noted above.

Seems like we'll be working on this for a while.

So, just the blank team site won't migrate via template from my MOSS to my WSS.  It will, on the other hand, migrate via template from my WSS to my MOSS.

However, when I look at my site in MOSS and click on Site Actions | Edit Page I get:

An unexpected error has occurred.

And the same Troubleshoot link.

So I can see the site, I just can't edit the page.

Okay, so this wasn't just a blank team site.  It had a goofy XML web part on it that decoded some goofy RSS feed.

So I drop the page into Web Part Maintenance mode by added ?contents=1 to the URL.  I delete the web part and now the page will open just fine.

So, since I really need to get this site moved, I try export and import.  Initailly, the import fails saying:

Fatal Error: Could not find Feature TransMgmtLib

I fix this by looking at the site features under settings.  I guess, this feature is on by default.

On my second try, I get:

Fatal Error: Could not find feature DataConnectionLibrary

Which is a little more difficult to find.  It's in Central Adminsrtation | Operations | Manage Farm Features.

I deactivate it and the import runs without a hitch.

 

-robot 

MOSS Backup, Recovery, Import, Export Operations

I made a this spreadsheet that composes the stsadm.exe commands for backup, recovery, import, export commands.

And working throug this task, I've figured out a couple of curious things.

When you import a site that had previously been exported, it looks like you lose modifications to the "Current View" on web part pages.  These are the ones that you make in the web part itself where you're not selecting a view shown in the list settings but changing the view in the web part itself.

This is one reason to be sure your list web parts are attached to views that actually exist.  On the other hand, the summary view, which is good for link lists becasue it minimizes the list's footprint on screen and gives you the cute little bullet, cannot be filtered any other way.

For example, I've got a link list with a link type column that chooses either internal or external  And on my web part pages, I just want to show the internal ones so I filter on link type.  But, since you can't create a summary view in the lists's settings that's filtered, you have to filter it inside the web part itself.  When you export the site and then import it, that filter setting is lost.

Rats.

The other thing is the backup operation for a multi-server farm where the database server is different from the web server.  Since the backup files will have to be written to one or the other, it's a good idea to not use "Local System" to run your database.  If that was a domain account, you'll have an easier time of establishing the correct permissions for the target location for your backup files.

 -robot

Site Columns and Look Up Lists

Okay, people, this is cool.

You all know I'm an old Lotus Programmer and we had an @DBLookup function that could go anywhere to grab a list of values to populate a lookup list.  It was way much cooler that SharePoint's alleged "Lookup" value type.  But, with site columns we're getting a little closer.  If you've ever wanted to see a quick and easy solution using site columns, this is it.

What I have is a number of site each with a directory that contains names and addresses and phone numbers and each item is assigned to one or more categories.  For example, I have categories for "Family", "Aquaintances", "Neighbors", and "Collegues".

And, since we all have our own site where we keep our own contact lists, I'd like to be able to maintain one lookup list for everybody's contact list categories.

First, I create a list in my home site.  I call it Contact Categories and I add my values as noted above.

Then, at the home level, I click Site Actions | Site Settings | Site Columns and then Create.  I name my column Contact Categories and I make it a Lookup datatype.  I put it in a new group called Home Lookups.  Then I tell it to look up from my Contact Categories list and use the Title.

Now, with the column in the bag, I go to my team site where my personal contact list is stored and I open my contact list and select Settings | List Settings and click on the link at the bottom of the Columns list that says Add from existing site columns.

I select my Home Lookups group and add my Contact Categories column.

Now, when I create a new contact, it edit item form reaches all the way out to my home site and provides values from the category list there.

This will obviously allow you to provide a central location for lookup lists that can now be managed seperately from the lists that will use the values.

hth

-robot

 

Print My Christmas Card Envelopes

Here's one for all you hot shot SharePoint guys.

You know what a crumudgeon I am but you may not know that my personal address book still lives in Lotus Notes.  Using the Domino Web server, I can print a completely blank page with just my return address and my recipient's address in a nice format suitable for various envelope sizes.  I print about 100 envelopes on my laser jet in about 20 minutes.  I sign the cards by hand and they all say "Merry Christmas" as opposed to "Happy Holidays."

Does anyone have any idea how this would work "out of the box" with a SharePoint contact list.  This is really the last gate to the ultimate sunset of my LotusIBM technology.  For example, is there a "mail merge" in Word that will grab data from such a list?

Thanks and if you want to get on the list, let me know!

-robot

MOSS KPIs

I spent a little while looking for this so maybe you may have as well.

The KPI toolset is really popular with the Executive Suite crowd and may well make the difference between go and no go on your next requisition so I'd like to be able to get some working and visible even if they are less than robust.

But you need the KPI list and he's a hard guy to track down.  Not only do you have to Enable Enterprise Features in Central Admin Operations but you also have to Enable Features on Existing Sites.  Then you have to install the Enterprise Features in the site where you want to create the KPI List.

Now, KPI List is found under Custom Lists on the site's Create page.  If you don't see it there, you've got to work the Enterpriste Features like I just described.

So, you'll need a source.  Now sources can be anything so I cerated a Custom List called Sales Call Activity and I gave it these columns:

  • Rep. Name – changed the Title column name to Rep. Name because it wouldn't let me just call it Name.
  • Call Quota
  • Actual Calls
  • Closed Sales
  • Total Sales Amount

Then I calculated columns to find:

  • Sales Quota 
  • Average Sale
  • Closing Ratio

Then add some data and go back to your KPI List.  Pull down the New menu and select KPI from a SharePoint List.

Do the easy one first.  Name it Closing Ratio.  Provide a description and comments, perhaps describing the indicators' values.

Browse out to find your source data list and view.

Then you've got to work the Number, Percentage, or Calculation options to get the Red, Amber or Green colors you want.  In this case, select the "Percentage.. where" option and select the closing ratio column is less than some target, say .5, since our closing ratio above was calcualted as a percentage.  Then, make it return green when that value is 0 (all reps' closign ratio > 50%) and yellow at 50 (half the reps' closing ratio >50%)

Then, I did one I called "Average Sale Targets."  I calculated the average of the average sale values and showed green when that value was over $1100 and yellow when over $900.  I guess the math is not entirely accurate here because of one person was way over alot and others were under by a tiny bit, the big numbers would be discounted by their lack of dispersal.  Average Average Sale does not equal Team Average Sale.  It would be nice to be able to capture view column totals and such.  In reality, you would probably point your KPI to a spreadsheet stored in some scorekeepers doc library and let excel do all the math.

I've found that it will help to succomb to a little "view diarrhea," filtering views to expose a single Sales Rep., for example.  Then you can get a KPI to indicate which reps are meeting which quotas.  When you use the KPI Web Part you can "Show Only Problems" and get the naughty list for Santa.

Also, create views to sort descending on Average sale, for example, and then limit item count to 1 to expose, in a web part, the best, or worst, performers.

hth

-robot

More on WSS (MOSS) Backup and Recovery

So we are able to create our backup images like we talked about last time.

A few issues remain before our approach can be called "complete." 

  1. What's up with all those files?
  2. What to do with the back-up files as they grow in size and number
  3. How to do a restore.
  4. What to do when a restore fails. 
  5. What about configuration and Central Admin content?
  6. What about your DBAs?
  7. Migrating to a Different Farm.
  8. Gotcha's

So, using my best Google searches, I again find that our friends at TechTarget offer some pretty good content.  So we can take these in order:

1.  What's up with all those files?

Remember that, when we ran the backup, we specified and backup folder.  Remember, also, that it was a fully qualified UNC path to which I had created a share called \MyServerBackups and it was this share that needed suitable permissions for the various actors involved.

So in this folder, we'll find a file called spbrtoc.xml and a bunch of folders named using the format spbrxxxx.  The xxxx is the index number of each specific backup operation.

Inside the backup folder, you'll find some folders with GUIDs for names with a Projects folder, a Config folder, and a RegistryBlob.reg file; let's just call these "mysteries."

In addition, you'll find a spbackup.log and an spbackup.xml file.  The backup log will contain the errors encountered if you're not lucky enough to have the job complete without errors. The XML file includes metadata details about the backup operation including the top level component ID and wanrning and error counts.

Once you run a restore using a given restore folder, you'll get sprestore.log and a sprestore.xml files in the folder as well.

2. What to do with the back-up files as they grow in size and number

The restore folders are the key to your answer here.  SharePoint does not care when you put or copy the folders.  You only need the root folder with the spbrtoc.xml file and all of its component back up spbrxxxx folders.

If I had a maintenance window, I'd do a full backup to new folder and then intermittant differentials throughout the working days.  Then I'd change folders for the next full backup and diffs.  Then I could slough off fulldiff sets whenever I got tired of them taking up my disk space.

3. How to do a restore.

Okay, the restore is pretty easy working from Central Admin Operations.  Select a restore directory and check the specific content you'd like to restore and let it fly. 

4. What to do when a restore fails. 

As far as failures are concerned, I presume youi'll run into the same permissions difficulties we had with backups.  Once those are resolved, you get the job to start and the page will refresh with updates but individual segments of the operation may fail with a pointer to the backup log.

In addition, remember that the timer job will have to be deleted manually from the Central Admin Operations Time Jobs Definitions page.  Click on the Backup/Restore item and then click Delete.  Otherwise, next time you try one, you'll get thid error:

The backup/restore job failed because there is already another job scheduled. Delete the timer job from the Timer Job Definitions page, and then restart the backup/restore job.

For example, I sufferred from the fact that my Windows SharePoint Admin Service had not been started by default which makes me go "Hmmm…"   When it crapped out, I got an error in the log that said:

Error: Object Shared Search Index failed in event OnRestore. For more information, see the error log located in the backup directory.

That's nice.  So a little more digging and it told me:

InvalidOperationException: System.InvalidOperationException: This operation uses the SharePoint Administration service (spadmin), which could not be contacted.  If the service is stopped or disabled, start it and try the operation again.

So, in my Control Panel Services tool, I find the service and started it.  I deleted the timer job and kicked off the restore again.

This time, I got an error on the primary.
port 80" web app, and the SSP.  In the logs, I found this error:

SPException: The specified component exists. You must specify a name that does not exist.

5. What about configuration and Central Admin content?

In the logs, I get this message:

[Farm] The configuration database and central administration content database components cannot be restored.

I think this occurred because I neglected to tell the restore page 2 to back up to the same farm and then did not give it new farm info onto which to restore iteself.

6. What about your DBAs?

7. Migrating to a Different Farm. 

While the restore file collection can be sourced from a different farm and restored onto a new host, the SMIGRATE tool might be better suited for migrating site collections from one farm to another.

8. Gotcha's

One thing is that your site security is embedded in your site so unless your new restore host can reach the same domain controller, you're going to have trouble getting anything to work.

One thing the community is unanimous about is meddling with the contents of the backup folders.  I would hesitate to try to fool the xml into thinking that folders exist when they don't or don't when they do. 

Another is that the command line interface bypasses the Job Timer; you won't get a job to delete if you get a failure.

I'm getting some cacheing issues when I restore where my pages are not completely refreshed until I restart my browser or reset IIS.

 

TechTarget.Com

http://searchexchange.techtarget.com/general/0,295582,sid43_gci1275048,00.html

Microsoft Support:

http://technet2.microsoft.com/Office/f/?en-us/library/16a7e571-3531-4a4e-baa7-f348a9f9d1d11033.mspx

Content Deployment

http://technet2.microsoft.com/Office/en-us/library/edcdacca-8013-460e-95a0-d2b83b6cc7ef1033.mspx?mfr=true