cancel
Showing results for 
Search instead for 
Did you mean: 

adding tags with office add-in causes script errors

tonytony
Champ in-the-making
Champ in-the-making
I try to add a "Tag" to a document and I get the following IE script error

Line: 86
Char: 1
Error: 'document.addTagForm.tag' is null or not an object
Code: 0
URL: http://xxx.xxx.xxx.xxx/alfresco/wcservice/office/documentDetails?p=/ENG/INF/LS/USERS/tony/testspace/...



Note that the document name is January.doc

After the error, I type continue running scripts, and the tag exists and all the tagging features work properly.
6 REPLIES 6

mikeh
Star Contributor
Star Contributor
Hi

Which version of MSIE are you running?

Thanks,
Mike

tonytony
Champ in-the-making
Champ in-the-making
6.0.2900.2180.xpsp2_gdr.050301-1519

IE 6

mikeh
Star Contributor
Star Contributor
Hi

A fix for this has been committed to HEAD today.

Thanks,
Mike

tonytony
Champ in-the-making
Champ in-the-making
I'm having trouble deleting the last tag from a document.

Add multiple tags to a document.
Click the [x] and delete the tags
If you have 6 tags, the first 5 delete work, but the last tag shows the "running action"  and "tag removed" animation, but the tag remains and the document is linked in the tag cloud to the tag.

mikeh
Star Contributor
Star Contributor
Hi

Fixed in HEAD.

There used to be a need for a workaround when adding an empty array to a node property, which has been resolved elsewhere.

If you want to apply the fix yourself, modify tagActions.post.js in the collaboration webscript package to remove the conditional code, as below:

from:
if (tags.length == 0)
{
   node.addAspect("cm:taggable");
}
else
{
   tagsArray = new Array();
   tagsArray["cm:taggable"] = tags;
   node.addAspect("cm:taggable", tagsArray);
}
to:
tagsArray = new Array();
tagsArray["cm:taggable"] = tags;
node.addAspect("cm:taggable", tagsArray);

Thanks (again!)
Mike

tonytony
Champ in-the-making
Champ in-the-making
Thanks for fixing it (and providing the source code fix too).