NetworkedPlanet Blog Insights into developing with NetworkedPlanet products

29Jan/090

SharePoint Module Known Issue: Topics not created for Pages

We recently received a bug report from one of our customers about the SharePoint Module not creating a topic when a new page was created in a Page Library. Normally, topics are created whenever an item is added to a list using SharePoint's ItemAdded event. However in this case the ItemAdded event handler was failing and so the topic was not created. Further investigation revealed that the ItemAdded event handler was not receiving the correct event information - in particular the reference to the new list item was null. This means that our event handler cannot determine the identity of the new list item and so cannot create a topic.
It turns out that this is an issue that has been hit by a number of people and not something directly related to the operation of the SharePoint Module itself. Until Microsoft correct this behaviour the only workaround available for this issue is to edit the item or its properties after creating it. Editing the item will force an ItemUpdated event which does contain the correct event properties and the topic will then be created.

14Jan/090

SharePoint Module User Scraping

Over the last couple of weeks I've had a lot of queries from developers about the "scraping" that we do to create topics for users in a SharePoint Module topic map. Some confusion has been caused by the fact that we have two ways of doing this and also some concern has been expressed about the amount of logging activity generated in particular by the AddSiteUsers task. This post is a copy of a support response I wrote for the last developer to enquire and I'm posting it here in the hope that it might be useful to others too.
We have two ways of scraping users from SharePoint into the topic map. There is a Topic Map Timer Task called AddSiteUsers, and a feature called NPProfileScraper.
The AddSiteUsers timer task is activated once on each site (SPWeb) where you activate the NPClassification feature. Its job is to ensure that there is a topic for each user that has access to the site, so when it wakes up it checks the SPWeb.AllUsers property and goes through it checking that each user has a topic in the topic map and creating a new user topic if needed. This task is run by the Topic Map Timer Job which you can see when you look at the farm timer jobs in the SharePoint Central Administration app. The Topic Map Timer Job wakes periodically and looks for Topic Map Timer Task topics in the topic map and then runs them one by one.
The NPProfileScraper feature does something similar but instead of using the SPWeb.AllUsers property on each SPWeb, it communicates with the MOSS Profile Service - this is why it is a separate feature (because you cannot install it on WSS 3.0).
In 3.0 and the current 3.1 beta, NPProfileScraper is much more configurable than AddSiteUsers. For example you can set NPProfileScraper to run once every X hours (default is 24) and you can specify the type to assign to the new user topics. AddSiteUsers tasks just run as frequently as the Time Job and because you have one per SPWeb that can be a lot of activity. Currently the only way to stop AddSiteUsers tasks from running is to go into the topic map (the default one you have named in NPSharePoint.xml) and delete all topics that have the name "AddSiteUsers - xxx" where xxx is a site name. Its not pretty but it does work, until someone activates NPClassification again, when the task topic gets created and the whole thing starts again.
In 3.1 we have fixed this by allowing you to configure AddSiteUsers to also run once every X hours (per SPWeb) and to also configure AddSiteUsers to never run.
The logging is another issue. In 3.0 and the early 3.1 betas there was no support for throttling logging like you can with the standard SharePoint logging (e.g. restrict it to logging only Error level messages and above). In the 3.1 release this will be fixed and you will be able to use the SharePoint Central Administration site to set the throttling for a number of different SharePoint Module-specific log categories.
If you are working on a 3.1 beta AND you have your users in the MOSS Profile Service (so NPProfileScraper gets them), then my advice is that you delete all the AddSiteUsers topics from the topic map now and when you get the final 3.1 release make sure that you set the configuration in NPSharePoint.xml to never allow those tasks to run.
If you are working on 3.0 and need a better fix than the workaround described above, please let me know and I'll try and get a new Hotfix out that includes some of the changes we already made in the main development branch of the code.

12Jan/090

SharePoint Module Hotfix 9 Now Available

A new hotfix package is available for version 3.0 of the TMCore SharePoint Module. This package addresses a number of bugs and performance issues. The full change list can be found below.
Systems Affected
This hotfix should be applied to any installation of the TMCore SharePoint Module 3.0 downloaded before 12th January 2009. If you downloaded your copy of the software from our site on or after this date, the hotfix is included in the package and you do not need to apply it again.
To determine if your system is affected, check the File Version property of the assembly NetworkedPlanet.SharePoint in the GAC (browse to C:\Windows\ASSEMBLY, locate the NetworkedPlanet.SharePoint assembly, right-click and choose Properties. The File Version can be found on the Version tab above Description and Copyright). This hotfix updates the File Version of the NetworkedPlanet.SharePoint assembly to 2.0.0.9 - if the file version shown is greater than or equal to 2.0.0.9, then you do not need to apply this hotfix.

Upgrade Instructions

  1. Download the Hotfix9 package.
  2. The package is provided in a compressed ZIP file. Unzip the package on a machine in the server farm. The package contains the following files:
    • NPSharePoint.wsp. This is an updated copy of the SharePoint Solution package provided with the 3.0 release of the TMCore SharePoint Module.
    • NPOfficeServer.wsp. This is an updated copy of the SharePoint Solution package provided with the 3.0 release of the TMCore SharePoint Module.
  3. Use stsadm to upgrade the NPSharePoint.wsp and NPOfficeServer.wsp solutions on the server. The exact command-line you use will depend on how you want to schedule the upgrade, but in any case it must include the -allowgacdeployment option. A sample command line would be:

    stsadm -o upgradesolution -name NPSharePoint.wsp -filename NPSharePoint.wsp -local -allowgacdeployment

    stsadm -o upgradesolution -name NPOfficeServer.wsp -filename NPOfficeServer.wsp -local -allowgacdeployment
  4. Using SQL Server Management Studio or a command-line tool such as OSQL.EXE, execute the SQL script SQL\npsharepoint.sql against the database that holds the topic map(s) used by your SharePoint installation. This will upgrade a stored procedure used by the Search Results Topic List Web Part.
  5. After applying the solution updates it may be necessary to restart IIS.
  6. If you have installed the NPCL Editor Extensions for the TMCore SharePoint Module,
    copy the contents of the NPCLEditor\Extensions directory to the extensions
    installation directory for NPCL Editor. The path to the extensions directory
    will depend on your installation but will typically be either:
    C:\Documents and Settings\All Users\Application Data\NetworkedPlanet\NPCLEditor\Extensions or
    C:\Documents and Settings\{User Name}\Application Data\NetworkedPlanet\NPCLEditor\Extensions
  7. This package also includes all updated documentation in the Doc directory. We recommend that you copy these files over the previously installed documentation files.
Change Log

  • BUGFIX: Fixes for the related topics field selector dialog windows to support topics with quotes and other special characters in the name.
8Jan/090

NPCL Schema Editor Update

The NPCL Schema Editor is a plugin for Visual Studio 2005 that enables you to create topic map ontologies through a simple graphical interface. This is the tool that you can see me using in our SharePoint Module videos. The goal of the schema editor is to make it easy for developers or information architects to convert the domain model into a topic maps model. The editor has been designed to be extensible by supporting additional user-defined menu actions and we have separately released a set of extensions to enable the topic map ontology to be mapped against Content Types in a SharePoint site.
Over the last few months that the NPCL Schema Editor has been out we have come across a few issues with installation (especially on Vista / Server 2008 machines) and with our extensions mechanism for the NPCL Schema Editor. This new release of the NPCL Schema Editor fixes those issues.
The main changes are:

  • BUGFIX: Fixed extension loading code so that a copy of the NetworkedPlanet.Npcl.Vs.Dsl.DLL is no
    longer required in the extensions directory. If you previously added this file to the
    extensions directory to fix extension loading issues you should now delete that file.
  • NEW: The installer now includes policy files so that extensions that targeted version 2.0.0.0
    or version 2.0.0.1 of the NPCL Schema Editor will continue to work after an upgrade.
  • NEW: Added README and INSTALL text files to the release package.

The sharp-eyed among you will have noticed that we haven't yet upgraded this package to work with Visual Studio 2008. This is the next thing on the list and will be part of the forthcoming 2.1 release of the schema editor.
You can download the new NPCL Schema Editor from here. Please note that if you have a previous version of the schema editor installed you must uninstall that before attempting to install the new version.
I also found a couple of minor annoyances in the SharePoint Module extensions for the Schema Editor and fixed those. The updated extension package can be downloaded from here.
As usual if you have any comments or suggestions for improvements or, dare I say it, bug reports please send them to support@networkedplanet.com.