If you’re running WordPress 2.1 trunk from SVN (currently at 2.1-alpha3, r4663) with Ultimate Tag Warrior (UTW) 3.141592 (the latest version as of today), UTW will lose all tags on a post when a new comment is made.

To fix this, edit the ultimate-tag-warrior-actions*.php files (in your UTW directory, there should be one -actions.php and one -actions-wordpress2.php, simply edit both). In the function ultimate_save_tags($postID), add the following lines right after the opening curly bracket:

    if (!is_admin()) return $postID;
    if (!isset($_POST['tagset'])) return $postID;

Save the files and you should be all set.

The problem occurs because WordPress trunk calls the edit_post hook when new comments are added. UTW doesn’t check the environment and just assumes the admin wanted to delete all tags, and then dutifully removes the tags from the post.

The fix just does nothing when the edit_post hook gets called from outside the admin publish area.

Update: See also Thomas’ comment for the latest UTW version.



2007-01-09 02:59 CET

Thanks, this was a real lifesaver :)

UTW3 i WordPress 2.1 at simply zimaq

2007-01-16 01:32 CET

[…] Je?li kto? u?ywa WordPress’a 2.1 alpha3/beta1 i Ultimate Tag Warriora 3 to zapewnie zauwa?y?, ?e znikaj? tagi dla wpisu po dodaniu komentarza do niego. Jak to naprawi?? Ano w bardzo prosty sposób opisany tutaj. […]

Ultimate Tag Warrior and WordPress 2.1 at The NeoSmart Files

2007-01-18 17:28 CET

[…] fix has just been released, recommended to update now! Bugs, Technorati Tags, Ultimate Tag Warrior, WordPressShare This […]

WordPress 2.1 at the brand with the four stripes

2007-01-23 15:06 CET

[…] Ultimate Tag Warrior 3 spraudnis ir sal?zis - pievienojot ierakstam jaunu koment?ru, paz?d tagi. Risin?jums šeit. […]

Basic Thinking Blog » Wordpress 2.1 und Ultimate Tag Warrior

2007-01-24 12:06 CET

[…] das neueste Wordpress mit dem Plugin UTW nicht richtig funktionieren soll, gibt es auf moeffju.net einen UTW Hack. Für all diejenigen, die unbeding updaten möchten, aber UTW einsetzen […]

WordPress 2.1 And Ultimate Tag Warrior Fix

2007-01-24 16:24 CET

[…] …it could be worse… WordPress 2.1 And Ultimate Tag Warrior Fix Just in case you didn’t know. For whatever reason, Matthias Bauer can explain it better, UTW&#… […]

Operation erfolgreich: Wordpress 2.1 running at Maveriksworld.de

2007-01-25 00:28 CET

[…] UTW-Plugin laufen dazu alle Erweiterungen fehlerfrei: wer selbst Hand anlegen will, kann mit diesem Hack auch dem Ultimate Tag Warrior auf die Sprünge helfen. Und wo wir gerade bei neuen Versionen sind: […]

who ever this concerns … » Blog Archiv » Upgrade auf WordPress 2.1 reibungslos

2007-01-26 06:46 CET

[…] hatte wohl arge Probleme, die zum Verlust der Tags führten! Mehr dazu etwa bei moeffju.net, dessen Hack ich aber nicht einspielen/-bauen […]


2007-01-28 16:48 CET

Thanks a lot for this fix! Like many others, it has saved me from further problems with losing tags. Keep up the good work mate! :)

Ultimate Tag Warrior + WP 2.1 = Lost Tags » JaypeeOnline

2007-01-28 16:48 CET

[…] the meantime, if you’re also a victim of this don’t fret. Moeffju has a manual fix for it. Below is the steps on how to do […]

Altmetall » Upgrade erledigt

2007-01-29 15:48 CET

[…] habe ich diesen Tipp übrigens hier. Tags: altmetall, baustelle, blog, technik, […]

Fox Haven Journal » Blog Archive » Upgrade Tips for WordPress 2.1 “Ella”

2007-01-29 23:21 CET

[…] of my plugins caused broken pages/categories, but I have updated them- especially a quick fix from Moeffju.net for Ultimate Tag Warrior- see end of post). Mostly took longer due to my FTP connection, and the […]

Mark Blevis » Ultimate Tag Warrior tags vanish in WordPress 2.1

2007-01-31 12:10 CET

[…] good news is, there is a fix published on moeffju.net. Tags:moeffju.net, Ultimate Tag Warrior, […]


2007-01-31 19:06 CET

After this fix, will the tags still be deleted after a moderated comment is approved?


2007-01-31 19:11 CET

karrie - after you applied the fix, the problem would be solved. I’ve also had the problem and did this fix and after that my tags stayed in place. Hehe :D

Christian Spanring's Blog

2007-01-31 21:01 CET

WordPress 2.1 Ella issues…

Just a quick list of some issues I experienced after I upgraded to WordPress 2.1 Ella:

Insert a link/image into your post won’t work: can old cached version of the Rich Text Editor’s JavaScript file causes the problem. Clear your browser c…

bruno afonso

2007-01-31 21:22 CET

This breaks the UTW fix for ecto publishing via xmlrpc :-)




2007-02-01 00:20 CET

bruno, with the changes described in http://www.robinlu.com/blog/archives/57, it should work since $_POST[‘tagset’] is set. Or does is_admin return false for xmlrpc requests? In the latter case, I can’t think of a simple fix except maybe a define() in xmlrpc.php; if you just remove the is_admin check, anyone can modify the tagset to any post if they can comment on it.


2007-02-02 15:48 CET

In the latest UTW-Version (Ultimate Tag Warrior 3.1415926) you have only the file ultimate-tag-warrior-actions.php. -wordpress2.php does no longer exist. And only if you aprove a comment you will lost your tags. I tried this (from Christines posting):

if (isset($_POST['not_spam'])) return $postID; // akismet fix
if (isset($_POST["comment"])) return $postID; // moderation.php fix
and the code from 082net (it’s above your comment)

// Save changes to tags
add_action('save_post', array('UltimateTagWarriorActions','ultimate_save_tags'));
if($wp_db_version < 3308 ) { // if lesser than WP 2.0
add_action('publish_post', array('UltimateTagWarriorActions','ultimate_save_tags'));
add_action('edit_post', array('UltimateTagWarriorActions','ultimate_save_tags'));
add_action('wp_insert_post', array('UltimateTagWarriorActions','ultimate_save_tags'));}
add_action('delete_post', array('UltimateTagWarriorActions', 'ultimate_delete_post')); 
All this together fix the problem. This works also with ecto-patch


2007-02-02 16:04 CET


if (!isset($_POST['tagset'])) return $postID; should work for all cases, including comment moderation. Did it not work for you?


2007-02-02 16:21 CET

Yes, I tried only this - but with the hook-changes at the end of the file. Without the hook-changes it doesn’t work.

This blog has just gone thru major surgery!

2007-02-03 19:46 CET

[…] plugins known/not-known to work and of course the code-edits to get Ultimate Tag Warrior to work @ this site. Following all the instructions actually worked without a hitch! Its only been 20 minutes since I […]

Null Pointer » WP 2.1 upgrade irks UTW

2007-02-04 08:09 CET

[…] whenever a new comment was being posted or when you try to edit the post. Fortunately, there is a cool fix available till a new release of UTW comes out. Article printed from Null Pointer: […]

????????? 2.1 ?? ??? ?????? ?? ???? at ??????????

2007-02-04 08:59 CET

[…] ?????? ???? ???? ?? ?? ??? ??? ?? UTW ?? ???? ?? ?? ??? ????? ?? ???? ?? ?? ??????? ?? […]

El blog de nico » Blog Archive » Fallo de plugins con Wordpress 2.1

2007-02-05 11:10 CET

[…] corregir el bug en Ultimate Tag Warrior 3.14592 (lo encontré aquí) deberemos modificar la función ultimate_save_tags($postID) de los ficheros […]

Livingston, il blog di Marco Mazzei / links for 2007-02-07

2007-02-07 12:20 CET

[…] WordPress 2.1-alpha3 and Ultimate Tag Warrior « moeffju.net (tags: plugin wordpress bug tag hack) Tag: […]

Empowering the Next Idea ... · WordPress 2.1 and Ultimate Tag Warrior Fix

2007-02-07 17:53 CET

[…] problem at moeffju.net’s blog. If you are using the latest version of UTW, you will want to read the comment provided by […]

Empowering the Next Idea ... · WordPress 2.1 and Ultimate Tag Warrior Fix

2007-02-07 20:39 CET

[…] Googled for a fix to see if others may be experiencing the same issue and discovered a WordPress 2.1 and Ultimate Tag Warrior fix at moeffju.net’s weblog.  If you are facing the same dilemma, do not worry, I recommend […]

Empowering the Next Idea ... · WordPress 2.1 and Ultimate Tag Warrior Fix

2007-02-07 20:56 CET

[…] you are using the latest version of Ultimate Tag Warrior (UTW version 3.1415926) you will want to read a comment by Thomas for expanded details on updating. 1 comment Comments feed for this article Trackback […]

Post Avatar 1.2.2 - Garinungkadol

2007-02-12 02:59 CET

[…] when used in Wordpress 2.1 - posting comments caused a post’s avatar to disappear. Thanks to moeffju.net I’ve identified and fixed (yay!) the […]

David Evans

2007-03-06 23:35 CET

Doesn’t work with 2.1.2. Spent hours on this, need to figure out if xmlrpc.php needs yet another tweak to work with Ecto.

sein » UTW ? wp 2.1 ????? tag ???

2007-03-30 15:49 CEST

[…] ??????????????Gaame ??? 2.1 ?????????????????????????? post ? tag ??????????????? N ?????????????? ???????????????????? […]

zuckerbrot » Blog Archive » wordpress 2.2.1 de Edition

2007-06-28 16:39 CEST

[…] Basic mal wieder etwas gelernt. Nämlich, dass das an der UTW Version liegt. Nach der Update auf die aktuelle Version ging doch tatsächlich alles wieder … tags:firefox 1.5, gut gegangen, upgrade, […]