Sometimes the site tag data used in Share’s document library can get out of sync with the tags on the content itself, especially in older versions of the 3.x product.
I came across this today on the Partner Sales Enablement site that we’ve just launched fully today on partners.alfresco.com, but fortunately the tag scope data is easy to rebuild.
To do this, you need to create a small JavaScript file that will execute the ‘refresh-tagscope’ action against a space.
var refresh = actions.create("refresh-tagscope"); refresh.execute(space);
Once you’ve created this file (I called mine refresh-tagscope.js) in Data Dictionary > Scripts, use Alfresco Explorer to navigate into the documentLibrary space within the site you want to refresh, and click View Details from the More Actions menu.
You can then use the Run Action dialogue to execute the JavaScript file you’ve just created. You might also want to do the same for the site space itself, which also collects tag scope data.
Once that’s done you should be able to navigate back into the site document library in Share and you should find that the tag data has been fully refreshed!
Hi Will,
do you know if this is executed asynchronously? I’m updating tags in a behaviour javascript onUpdateProperties, and tags often get of of sync. Calling this method after update in my script would solve this, but if you have a large number of documents it would stall the saving of document properties.
Thanks.
Hi Peter, interesing application of the action. Looking at the JS API reference it doesn’t appear there is an obvious way to execute asynchronously, so in this case the action would block until the refresh has completed.
I’m sure the Java API offers more flexibility.
I am facing this problem whenever I delete some files/folders from a site doc lib.
It looks like it has not been fixed in 3.4a/b either …. could that not be included whenever a site doc lib has been called?
PS: I am createing a large amount of sites on the fly, programmatically thus this solution is a bad workaround, but I am glad it exists 🙂
So I have run this, but the tag still seem to be in the list.
is there a way to find what site thinks this tag is related to ?
Michael – you should be able to find what content item is referencing the tag by doing a search in Share. If you get a large number of results then you could try using the link returned by the Site Tags dashlet (http://code.google.com/p/share-extras/) instead, which hits the search page using ?tag=blah, rather than ?q=blah, IIRC.