WordPress 2.1-alpha3 and Ultimate Tag Warrior

33 Comments

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.

ketsugi

Thanks, this was a real lifesaver :)

2007-01-09 02:59 CET

UTW3 i WordPress 2.1 at simply zimaq

[...] 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. [...]

2007-01-16 01:32 CET

Ultimate Tag Warrior and WordPress 2.1 at The NeoSmart Files

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

2007-01-18 17:28 CET

WordPress 2.1 at the brand with the four stripes

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

2007-01-23 15:06 CET

Basic Thinking Blog » Wordpress 2.1 und Ultimate Tag Warrior

[...] 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 [...]

2007-01-24 12:06 CET

WordPress 2.1 And Ultimate Tag Warrior Fix

[...] ...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&#... [...]

2007-01-24 16:24 CET

Operation erfolgreich: Wordpress 2.1 running at Maveriksworld.de

[...] 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: [...]

2007-01-25 00:28 CET

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

[...] 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-26 06:46 CET

Jaypee

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! :)

2007-01-28 16:48 CET

Ultimate Tag Warrior + WP 2.1 = Lost Tags » JaypeeOnline

[...] 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 [...]

2007-01-28 16:48 CET

Altmetall » Upgrade erledigt

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

2007-01-29 15:48 CET

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

[...] 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 [...]

2007-01-29 23:21 CET

Mark Blevis » Ultimate Tag Warrior tags vanish in WordPress 2.1

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

2007-01-31 12:10 CET

karrie

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

2007-01-31 19:06 CET

Jaypee

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

2007-01-31 19:11 CET

Christian Spanring's Blog

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...

2007-01-31 21:01 CET

bruno afonso

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

http://www.robinlu.com/blog/archives/86/

here

2007-01-31 21:22 CET

moeffju

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-01 00:20 CET

Thomas

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 15:48 CET

moeffju

@Thomas:

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

2007-02-02 16:04 CET

Thomas

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

2007-02-02 16:21 CET

This blog has just gone thru major surgery!

[...] 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 [...]

2007-02-03 19:46 CET

Null Pointer » WP 2.1 upgrade irks UTW

[...] 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: [...]

2007-02-04 08:09 CET

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

[...] ?????? ???? ???? ?? ?? ??? ??? ?? UTW ?? ???? ?? ?? ??? ????? ?? ???? ?? ?? ??????? ?? [...]

2007-02-04 08:59 CET

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

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

2007-02-05 11:10 CET

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

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

2007-02-07 12:20 CET

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

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

2007-02-07 17:53 CET

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

[...] 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 [...]

2007-02-07 20:39 CET

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

[...] 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 [...]

2007-02-07 20:56 CET

Post Avatar 1.2.2 - Garinungkadol

[...] 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 [...]

2007-02-12 02:59 CET

David Evans

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.

2007-03-06 23:35 CET

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

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

2007-03-30 15:49 CEST

zuckerbrot » Blog Archive » wordpress 2.2.1 de Edition

[...] 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, [...]

2007-06-28 16:39 CEST

Comments are closed for this post