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.
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.
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.
- Download the Hotfix9 package.
- 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.
- 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
- Using SQL Server Management Studio or a command-line tool such as OSQL.EXE, execute the SQL script
SQL\npsharepoint.sqlagainst 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. - After applying the solution updates it may be necessary to restart IIS.
- 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\Extensionsor
C:\Documents and Settings\{User Name}\Application Data\NetworkedPlanet\NPCLEditor\Extensions - This package also includes all updated documentation in the Doc directory. We recommend that you copy these files over the previously installed documentation files.
- BUGFIX: Fixes for the related topics field selector dialog windows to support topics with quotes and other special characters in the name.
SharePoint Module Hotfix 8 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 17th December 2008. 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.8 - if the file version shown is greater than or equal to 2.0.0.8, then you do not need to apply this hotfix.
- Download the Hotfix8 package.
- 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.
- 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
- Using SQL Server Management Studio or a command-line tool such as OSQL.EXE, execute the SQL script
SQL\npsharepoint.sqlagainst 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. - After applying the solution updates it may be necessary to restart IIS.
- 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\Extensionsor
C:\Documents and Settings\{User Name}\Application Data\NetworkedPlanet\NPCLEditor\Extensions - This package also includes all updated documentation in the Doc directory. We recommend that you copy these files over the previously installed documentation files.
- BUGFIX: Implemented a workaround for the problem that SharePoint does not correctly
notify event handlers when the URL of a page is changed through the Page
Settings. Topics representing pages should now get their content URL
correctly updated if the editor changes the page URL in Page Settings. - BUGFIX: Fixed an error that meant that topics for items in lists that support only
major version numbers and require content approval were not getting updated
properly and appeared to lose related topics information. - BUGFIX: Fixed resource references in Classify.aspx and other pages to ensure that
pages display correctly on sites that have only WSS installed. - BUGFIX: Fixed an issue that prevented the list of Content Type to Topic Type mappings
from displaying when one of the mappings contains a reference to a
non-existant SharePoint field.
SharePoint Module Hotfix 6 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 15th September 2008. 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.6 - if the file version shown is greater than or equal to 2.0.0.6, then you do not need to apply this hotfix.
- Download the Hotfix6 package.
- 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.
- 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
- Using SQL Server Management Studio or a command-line tool such as OSQL.EXE, execute the SQL script
SQL\npsharepoint.sqlagainst 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. - After applying the solution updates it may be necessary to restart IIS.
- 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\Extensionsor
C:\Documents and Settings\{User Name}\Application Data\NetworkedPlanet\NPCLEditor\Extensions - This package also includes all updated documentation in the Doc directory. We recommend that you copy these files over the previously installed documentation files.
- BUGFIX: Fixed security issue that prevented the NPClassification feature
from being successfully activated through the web GUI in certain
circumstances. - BUGFIX: Fixed an issue with the MossAdvancedFacetedSearchWebPart that cause
it to fail to render correctly if no additional fields were configured. - BUGFIX: Fixed security filtering issue that caused some rows to be incorrectly
filtered when multiple PSI columns are used. This applies especially
to filtering by the TwoHopQueryWebPart. - BUGFIX: TagDisplayWebPart now renders links as full URLs rather than relative
URLs. This fixes a problem where the relative URL path was incorrect
when the web part was placed on the root Web of a site collection. - BUGFIX: Fixed Related Topics Field rendering so that it is no longer
language sensitive. There should now be no need to edit
fldtypes_topicmap.xml when deploying to sites using languages
other than English. - BUGFIX: Fixed error reporting when a topic map timer job cannot be created
due to missing SharePoint Module base topic types. - BUGFIX: Fixed permissions error that prevented users from activating the
NPClassification feature through the browser on a site that uses
forms-based authentication. - BUGFIX: The inline selector for related topics fields now includes topics
that do not have a SharePoint URN subject identifier. - BUGFIX: The inline selector for related topics fields now shows topics
in ascending alphabetical order. - BUGFIX: Activating the NPClassification feature multiple times on the
same site will no longer result in multiple AddSiteUser
timer task topics and will also remove any existing duplicate
timer task topics for that site. - BUGFIX: Topic types on the Site Classification page are now shown as
a tree with each level alphabetically sorted. - BUGFIX: Search Results Topic List Web Part now hides all result topics
that are not an instance of a type from the NPCL schema. This
prevents users from seeing "infrastructure" topics such as
NPCL types or SharePoint Module Timer Task topics. The web
part can be configured to override this behaviour and show
all topics. NOTE: This update requires a change to the
SQL stored procedures used by the TMCore SharePoint Module.
Be sure to read the upgrade instructions carefully.
SharePoint Module Hotfix 4 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 2nd June 2008. 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.4 - if the file version shown is greater than or equal to 2.0.0.4, then you do not need to apply this hotfix.
Installation Instructions
- Download the Hotfix4 package.
- 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.
- 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
- After applying the solution updates it may be necessary to restart IIS.
- 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\Extensionsor
C:\Documents and Settings\{User Name}\Application Data\NetworkedPlanet\NPCLEditor\Extensions
- DOCS: Added documentation of the list Auto-classification feature to the Site
Developers Guide. - BUGFIX: _ITEM_URL_ column now returns the correct URL for links to items on
nested sites. - BUGFIX[695]: Fixed a security exception in the ItemDeleted event handler that
could cause topics to not get deleted from the topic map when the
item is deleted via a site that uses forms-based authentication. - BUGFIX: Fixed content type mapping lookup to take account of URL mappings in
NPUrlMap.xml. This means that when using extended sites, there is now
no need to duplicate the content type mappings. - BUGFIX: Fixed reporting of TopicMapIndexClient connection errors to include
stack trace. - BUGFIX[685]: Fixed CustomAction Id clash that occasionally caused ASP.NET
errors when displaying List Settings on a site with the
NPClassification feature enabled. - BUGFIX[690]: Fixed the login dialog for the NPCL Editor extensions to accept
user names in the traditional <domain>\<user> form instead of
<domain>/<user> - ENHANCEMENT: Web parts and AssociatedTopicsFields now use a common cache for
context topics during page request processing. This will reduce
the number of database queries required to display pages/list
items that have multiple query web parts or multiple related
topics fields on them.
This hotfix also rolls in the fixes previously provided in Hotfix1, Hotfix 2, and Hotfix 3.
For Further Support
If you have any questions about this hotfix or require any further support, please contact us at support@networkedplanet.com.
TMCore SharePoint Module 3.0 Known Issues, Fixes and Workarounds
TMCore SharePoint Module 3.0 Known Issues, Fixes and Workarounds
This blog entry is used to record and document known issues found with the
TMCore SharePoint Module version 3.0 and their current status.
If you discover an issue with the TMCore SharePoint Module that is not listed here, then please report it to us at support@networkedplanet.com.
| Ref. | Issue | Resolution |
|---|---|---|
| 690 |
Cannot connect to SharePoint site from the NPCL editor. When using the NPCL Editor Extensions provided with the TMCore SharePoint Module to map topic types in the ontology to content types, you may be presented with a log-in dialog to connect to the SharePoint site to retrieve a list of content types or field types. If you are connecting to the SharePoint site as a domain user, the dialog requires a domain and user name to log in, you must enter this full log-in name in the form domain/user, rather than the more usual domain\user form. NOTE: From Hotfix 4 for the TMCore SharePoint Module, this fix will be included in the installation package. |
Workaround: Enter your log-in name in the form domain/user. |
| 685 |
ASP.NET Error when attempting to enable List Auto-classification When using the link from a List Settings page to enable Auto-classification on the list, you may encounter the following ASP.NET error: Multiple controls with the same ID 'ctl00$PlaceHolderMain$ctl05$ctl01$RptControls$EnableAutoClassification' were found. Trace requires that controls have unique IDs. This error message is caused because two different elements of the NPClassification feature accidently use the same Id value. To fix this on an existing installation, follow these steps on each server in the server farm:
NOTE: From Hotfix 4 for the TMCore SharePoint Module, this fix will be included in the installation package. |
Displaying Related Topics in the Search Core Results Web Part
A few people have asked about how to more closely integrate the standard SharePoint Search Core Results Web Part with the related topics information that is maintained by the SharePoint Module. There are a number of different use cases, but in this post I'll focus on a common request - to be able to include related topics in the metadata returned by a text search and display them in the Search Core Results Web Part.
The procedure for doing this is actually quite simple. All you need to do is
- Add the field(s) you want to display to the list of Managed Properties for the crawler.
- Add the managed property (or properties) to the list of columns returned by the Search Core Results Web Part.
- Update the XSLT stylesheet used to render the results.
Adding Fields to the Crawler Managed Properties
The first step is to make sure that the related topics field you want is added to the list of managed properties for the crawler. To do this you must go to the SharePoint Central Administration site and select the SSP for the web application. The click on the link Search > Search Settings and on the page that is displayed, click on the link "Metadata property mappings". This shows the following screen:
Click on "Create New Managed Property". From this page you can add a new property that will be populated by the search crawler and specify which field(s) provide a value for the property. Note that you can specify multiple properties here so if you want to, you can combine the value of several different related topics fields into a single more generic property. For example on the demo news story site we have our stories classified by three related topics fields : Who, What and Where. We can choose either to create separate managed properties for each of these fields or to combine them all into a single field. I'll show this latter option in the example below.
To create the new managed property, you should enter the following information into the fields:
Name and Type: The name for the managed property gets used in the XML generated by the Search Core Results Web Part, so it is best to create a name string with simple ASCII characters and no spaces. For the type, select the Text option.
Mappings to crawled properties: Add mappings for the related topics field(s) you want to be indexed. Note that if you specify multiple mappings you have the choice of either adding all of the mapped values or of treating the list as a priority list of mappings that justs adds the values for the first mapped field found. (NOTE: If you cannot find the related topics fields in the list of crawled properties, this probably means that you have no documents with a value in this field - to fix this, create a new document or update an existing one to add a value to the related topics field, save the document (and publish it if necessary) and then run the crawler or wait for an incremental crawl or full crawl to run.).
Use in Scopes: Leave this box unchecked.
This is how my new managed property mapping looks - I want to map three related topics fields (ND_What, ND_Where, ND_WHo) to a single property called "Classification".
alt="Screenshot of the completed New Managed Property form."/>
Now run the crawler again (or wait for it to run again). You need a full crawl for this new property to get populated correctly.
Add the Managed Property to the Columns returned by the Search Core Results Web Part
To get our search to return the new managed property we just need to configure the query columns. To do this, go to the search results page and put it into edit mode:
Bring up the property editor for the Search Core Results Web Part and expand the section titled "Results Query Options". Edit the "Selected Columns" property in that section (it is easiest to do this by bringing up the text editor dialog for the field). Add a column definition for the new managed property. The XML is simply:
<Column Name="Property Name"/>
Your query should now be returning the related topics field values in the XML that is styled by the Search Core Results Web Part - to check this you could just change the web part to use the debug stylesheet that comes with the TMCore SharePoint Module. I usually do this by uploading the debug stylesheet to a document library and then putting a link to it into the "XSL Link" property (found in the "Miscellaneous" property group). For my example site, this is what I get in the Search Results Web Part when I now use the debug stylesheet (I've highlighted the related topics field values that are returned by the new managed property):
Use XSLT to style the results
OK, so far so easy
. Now for the tricky bit - the value returned by the related topics fields is actually a set of 4 values for each related topic - in order, these are the topic name, the topic OID, a link to the item that the topic represents (if any) and a PSI for the topic. Each of these four values are separated with the separator string ';#'.
<classification> The Art Of War (1.0 PUBLISHED) ;#5868 ;#http://dev-server-2/what/Pages/TheArtOfWar.aspx ;#urn:x-versionsupport.networkedplanet.com:sp::...:1.0:PUBLISHED ;#;Troy (1.0 PUBLISHED) ;#5913 ;#http://dev-server-2/where/Pages/Troy.aspx ;#urn:x-versionsupport.networkedplanet.com:sp::...:1.0:PUBLISHED ;#;Odysseus ( PUBLISHED) ;#6085 ;#http://dev-server-2/who/Pages/Odysseus.aspx ;#urn:x-versionsupport.networkedplanet.com:sp::...::PUBLISHED;# </classification>
So we need some slightly fancy XSLT to parse the field values. This is the XSLT I have come up with:
<!-- Template to render a list of related topics field values --> <xsl:template name="DisplayClassification"> <xsl:param name="str" /> <xsl:if test='string-length($str) > 0'> - <xsl:call-template name="split"> <xsl:with-param name="string" select="$str"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="node()|@*" mode="split" name="split"> <xsl:param name="string" select="string()"/> <xsl:variable name="sep" select="';#'"/> <!-- Extract the first field into $tmp --> <xsl:variable name="tmp" select="substring-before($string, $sep)"/> <!-- If multiple fields are concatenated together, topics can end up with a ';' prefix on their name.The following ensures that $topicname is stripped of this if necessary --> <xsl:variable name="topicname"> <xsl:choose> <xsl:when test="starts-with($tmp,';')"> <xsl:value-of select="substring-after($tmp, ';')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$tmp"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="rest1" select="substring-after($string, $sep)"/> <xsl:variable name="topicid" select="substring-before($rest1,$sep)"/> <xsl:variable name="rest2" select="substring-after($rest1,$sep)"/> <xsl:variable name="link" select="substring-before($rest2,$sep)"/> <xsl:variable name="rest3" select="substring-after($rest2,$sep)"/> <xsl:variable name="urn" select="substring-before($rest3,$sep)"/> <xsl:variable name="nextitem" select="substring-after($rest3,$sep)"/> <!-- Render the topic and link as an HTML anchor. You could replace this with your own rendering code --> <xsl:if test="$topicname and $link"> <a> <xsl:attribute name="href"> <xsl:value-of select="$link"/> </xsl:attribute> <xsl:value-of select="$topicname"/> </a> </xsl:if> <!-- Check if a recursive call should be made to parse the rest of the field --> <xsl:if test="contains($nextitem,$sep)"> <xsl:text>, </xsl:text> <xsl:call-template name="split"> <xsl:with-param name="string" select="$nextitem"/> </xsl:call-template> </xsl:if> </xsl:template>
You can download this snippet of code from here: Download file
The first template is the one that you can call from wherever you want to render a managed property that contains the value of one or more related topics fields. The str parameter must contain the content of the managed property to render. The second template is a recursive call that parses the first four fields from the string, extracting the values to four local variables and then renders the topic name and link as an HTML anchor element (you could replace this with your own rendering code), finally if there is at least one separator left in the rest of the field value, then it makes a recursive call that will parse the next four fields and so on until we are done.
This is the final result - in this case I'm just calling my rendering as part of the rendering for result metadata, of course you can use XSLT to render those related topics any way you like in the results list.
Conclusion
In this short article I've shown you the basic procedure for including topics from related topics fields in the main portal search results web part. With the flexibility for rendering provided by XSLT it should be possible to create a number of interesting and useful search renderings that combine full-text search with related topic information.
SharePoint Module Hotfix 3 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 April 2008. 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.3 - if the file version shown is greater than or equal to 2.0.0.3, then you do not need to apply this hotfix.
Installation Instructions
- Download the Hotfix3 package.
- 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.
- 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
- After applying the solution updates it may be necessary to restart IIS.
- BUGFIX: Fixed topic name generation to remove HTML encoding from the name strings.
- BUGFIX: Fixed intermittent bug with TopicCreator page that prevented it from
finding the newly created list item. - BUGFIX: Fixed an issue with the XML Query editor web control that caused it to
crash when editing queries with complex nesting of selectors. - BUGFIX: Fixed the SQL generated from XML Query documents to work correctly when
multiple selectors are grouped under an OR group. - BUGFIX: The ContentTypeCreatorFeatureReceiver that processes the MappingsUpdates.xml
file generated by the NPCL Schema Editor extensions now pushes all updates down
to lists. - BUGFIX: XML Query document locations using in Topic Query Selectors can now be
specified using server-relative URLs. - BUGFIX: Fixed performance issue with Related Topics fields when refreshing from the topic map.
- BUGFIX: Fixed webpart descriptor file for SearchResultsTopicList by changing it from a .dwp to a .webpart file. NOTE: It may be necessary for upgraders to remove the SearchResultsTopicList web part and add it again for this bug fix to take effect.
- BUGFIX: Reinstated .dwp files for the simple Topic Search Web Part and the Topic Map Search Results web part.
- BUGFIX: View Properties on an XML Query document now correctly displays boolean AND and OR groups and the sort order of the results if any sorting is applied.
This hotfix also rolls in the fixes previously provided in Hotfix1 and Hotfix 2, but it does not include the development tools updates provided in the Hotfix 2 package.
For Further Support
If you have any questions about this hotfix or require any further support, please contact us at support@networkedplanet.com.
SharePoint Module Hotfix 2
A new hotfix package is available for version 3.0 of the TMCore SharePoint Module. This package addresses a number of bugs and provides a couple of additional enhancements for site developers. The full change list can be found below.
Systems Affected
This bug will occur on any installation of the TMCore SharePoint Module 3.0 downloaded before 21st March 2008. 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.2 - if the file version shown is greater than or equal to 2.0.0.2, then you do not need to apply this hotfix.
Installation Instructions
- Download the Hotfix2 package.
- 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.
- Docs. This directory contains the updated Site Developers Guide documentation.
- Stylesheets. This directory contains the updated base stylesheets for site developers.
- NPCLEditor. This directory contains the updated NPCL Schema Editor extensions for the TMCore SharePoint Module
- 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
- After applying the solution updates it may be necessary to restart IIS.
- To install the updates to the NPCL Schema Editor extensions, simply copy the contents of the NPCLEditor\Extensions directory to the local extensions directory on your development machine (typically
C:\Documents and Settings\All Users\Application Data\).
NetworkedPlanet\NPCLEditor\Extensions
- BUGFIX: TwoHopQueryWebPart is now properly security filtering both the
TargetTopic and the ViaTopic. - BUGFIX: Modified the sample TwoHopQueryWebPart stylesheets so that they
render in a meaningful way even if there is no CSS associated with their CSS
class. Each grouped list now renders as a <strong> tag wrapped around the
group header and a <ul> containing <li> tags for each member of the group -
BUGFIX: Fixed an error in the EnterpriseServices.SocialTagging module that
caused the creation of a new tag to take a long time to complete. Creating new
tags in the social tagging web parts should now be much faster. -
BUGFIX: Fixed the ItemAdded event handler to ensure proper completion when the
NPItemBase feature is not activated. -
BUGFIX: Topic names for topics that represent SharePoint list items are now
generated from the formatted representation of the SharePoint field configured
by the Topic Type Mapping. This change ensures that calculated fields are
rendered as just their formatted string value. -
BUGFIX: Fixed rendering of Source attributes in Related Topics Field links in
views to render a full URL rather than a web-relative URL. - ENHANCEMENTS: Enhancements made to the NPCL Schema Editor Extensions to ensure
more consistent editing of features that are already deployed to a server. The
enhancements should make it much easier to update a test deployment of features
generated using the NPCL Schema Editor extensions. - ENHANCEMENT: Modified the Associated Topic Field properties editor to allow
the name of the form used by a Topic Creator to be entered in a text field
rather than chosen from a drop-down list of forms. This enables the use of
forms other than those contained in the list (e.g. forms from _layouts)
for the creation of items.
This hotfix also rolls in the fixes previously provided in Hotfix1.
For Further Support
If you have any questions about this hotfix or require any further support, please contact us at support@networkedplanet.com.