hi,

as per the attached screenshot, if you attach some ajax widget like FileField to a page that has ActiveTags, then the ActiveTag field as well as the popular tags field will be duplicated when Drupal.behaviors.tagger & Drupal.behaviors.taggerpop are called.

the following patches seem to do the trick.

//FOR active_tags.js
Drupal.behaviors.tagger = function (context) {
jQuery.each(Drupal.settings['active_tags'],function(i, v) {
if ($(v).length == 1 && !$(v).hasClass('active-tags-processed')) {
activetags_activate(v);
$(v).addClass('active-tags-processed');
}
});
}

//FOR active_tags_popular.js
Drupal.behaviors.taggerpop = function (context) {
jQuery.each(Drupal.settings['active_tags_popular'],function(i, v) {
if ($(v).length == 1 && !$(v).hasClass('active-tags-pop-processed')) {
activetags_popular_activate(v);
$(v).addClass('active-tags-pop-processed');
}
});
}

CommentFileSizeAuthor
Picture 1.png70.74 KBheacu

Comments

darrenmothersele’s picture

Yes, this fixes the bug when used with ImageField etc.

OneTwoTait’s picture

Works like a charm. Thanks. :)

darrenmothersele’s picture

Status: Needs review » Reviewed & tested by the community

marked as tested, adding to next version.

Flying Drupalist’s picture

Please commit?

entrigan’s picture

I second that :) this is an important enough patch to warrant a release.

dragonwize’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Look for this in 1.2 tonight.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.