Wednesday, January 09, 2019

SharePoint 2013 - Taxonomy Update Scheduler not updating the terms in site/web/list

What is Taxonomy Update Scheduler Job (UpdateHiddenListJobDefinition)?

This update job is responsible to update the terms in a hidden list which is located in each site collection. MS added this for faster to query a internal list than the managed metadata service.

Sometimes this doesn't work because of ECMUsedTerm table is not in sync. ECMUsedTerm table is responsible for capturing old and new values which then used by the timer job to update the hidden local list for taxonomy.

Below are two reason might cause this issue

1. You create new cleaned Managed metadata service and imports Term Set and terms from different farm.
2. You might detach and attach the content DB from one farm to another.

And of course there are probably several other reasons for the hidden list's getting out of sync with the TermStore.

Here is script to run on each site collection if Taxonomy Update Scheduler Job doesn't not work for a particular web application:


$url = "https://yoursite"
$site=Get-SPSite $url
$tax = Get-SPTaxonomySession -Site $url
$ts = $tax.TermStores[0]
$ts.UpdateUsedTermsOnSite($site)
$site.dispose()

Make sure you are a SiteCollection admin when executing this script.