re:publica 08
26 Feb, 08
24 Apr, 07
I will be participating in this year’s Summer of Code, working on WordPress internationalization. You can read my full proposal online. Of over 6,000 applications, about 900 were accepted. WordPress could only accept 10 out of about 90 applications. It’s bound to be an interesting summer with working on WordPress and Habari at the same time, plus $work, photography, and ‘real’ life.
The frenzy officially starts on May 28th, but I’ll likely start working on things earlier — as soon as I have some time at $work, that is — since the task is not quite as easy as it might appear. A big part of the trouble stems from the fact that WordPress uses third-party components which are maintained by their respective project groups, and, in the case of TinyMCE, aren’t even PHP, but JavaScript. The other problem is translating basically static texts like the README file, but also plugin and theme descriptions. Obviously, we can’t expect every plugin and theme author to speak several languages, and since metadata is stored in a plaintext blob, we can’t use gettext or similar tools (aside from the fact that we can hardly ship a giant gettext mo containing all translations for all known plugins).
And I haven’t even begun to talk about cultural localization…
23 Apr, 07
Whee, the nice folks over at Watershed Studio have credited me for the stuff I contributed to the Sphere Related Content Plugin. :D
18 Apr, 07
Let’s create a 2.2 branch and start removing the current tagging implementation. I’ll announce on my blog that 2.2 will be delayed.
So, fear not, ye UTW users. There shall be no tagging in 2.2.
The discussion has been lively to say the least.
Update: Demolition!
Update: Official Announcement
10 Apr, 07
**Update:** I forgot to mention that you must hack a core file and adapt your theme, too. See the end of the article.
Upgrading to WordPress 2.2 bleeding edge is an adventure, always. Not necessarily because they introduce new bugs—it’s the new features that are sometimes worrying. When one svn up changed all the feeds from somewhat-valid RSS to invalid Atom, I didn’t complain because, hey, it’s the bleeding edge, and Atom is so much better anyway. I just fixed the bug, and it was good. (In retrospect, I should have sent a patch. I forgot.)
Having tagging functionality in the WordPress core is a good idea, too. In general. Basically. However, if there already exists a widely-deployed tagging plugin—and for WordPress, one very much does exist—it may be a good idea to look at the functionality and semantics of the existing plugin before reinventing the wheel, badly.
UTW has a function named is_tag(). WordPress 2.2 adds a function of the same name. Ergo, things break. Renaming the plugin dir helps, but your tags are gone. Re-activating the plugin shows you the shiny new plugin sandboxing (which, btw, Habari started in January), but doesn’t bring you back your tags.
Some searching might point you to the UTW tags importer (Options > Import > UTW). After a funny message about deleting unwanted tags from the UTW management page (hey, no plugin, no options page, okay?), the import kinda works. The “Did we say 5 steps? We meant 4. Ha ha ha.” joke is getting pretty old pretty fast, though. Then, instead of the UTW_ShowTagsForCurrentPost() function, you use the_tags() in your template. Of course, the semantics of the_tags() are slightly different from those of the_category(), and completely unlike the old UTW functions semantics.
So I decided to get UTW back. Despite claims to the opposite, the changes required are actually pretty simple: open ultimate-tag-warrior.php and search for occurrences of is_tag(. Replace all occurrences with UTW_is_tag(. Activate the plug-in.
Update: Do the same in your theme - where you use is_tag() now, change it to UTW_is_tag(). Then, open wp-includes/rewrite.php, search for the function get_tag_permastruct, and add return false; directly after the opening brace. (This unbreaks /tag/ pages.)
Done.
04 Mar, 07
If you’re using the latest bleeding-edge SVN version of WordPress with Ultimate Tag Warrior, check your feed’s validity. WordPress is finally getting around to implementing Atom 1.0 instead of sticking with the comparatively ancient Atom 0.3 (even the validator’s support is deprecated).
Unfortunately, due to the way WordPress and UTW work, UTW doesn’t have a way to really know what kind of feed is requested — the hook it registers is called the_category_rss, and it’s called with a parameter that’s either ‘rdf’, ‘rss’, and sometimes blank.
Even more unfortunate is that the_category_rss is called when an Atom feed is requested. UTW happily inserts the hardcoded <dc:subject> tags into the feed, and since that’s been superseded by <category> in Atom 1.0, and WordPress doesn’t declare the Dublin Core namespace anymore, your feed has just become invalid. Fix after the jump.
To fix, open ultimate-tag-warrior-actions.php in your UTW directory, search for dc:subject, and change ultimateaddtagstorss like this:
Replace the line inside the foreach that starts with $the_list with:
$the_list .= "\n\t<category term=\"". $category->cat_name . "\" />";
And replace the line starting with $format, after the foreach, with:
$format="<category term=\"%tagdisplay%\" />";
This is gonna break your RSS/RDF feed, but you should’ve switched over to Atom anyway, right?
It’s also pretty hacky to even build an XML document by string concatenation, but that’s not easily fixed. Don’t use characters in your tag names that would invalidate your XML, ok?
02 Mar, 07
Update: The announcement is out. The important part is:
[…] a cracker had gained user-level access to one of the servers that powers wordpress.org, and had used that access to modify the download file […]
Nothing in the Subversion repository was touched, so if you upgrade and maintain your blog via SVN there is no chance you downloaded the corrupted release file.
This is the kind of thing you don’t want to happen to anyone. Kudos to the WordPress guys for their quick reaction.
Original entry below.
The following mail was just posted to the WordPress mailing lists, as a reaction to this security advisory. There are multiple XSS vulnerabilities in WordPress <= 2.1.1 — inserted by a cracker — and an upgrade is urgently recommended.
Subject: Upgrade to 2.1.2
From: Matt Mullenweg m at mullenweg.com
Date: Fri Mar 2 19:41:35 GMT 2007Hello everyone.
If anyone is running 2.1.1, or knows someone who is, I would recommend
upgrading to 2.1.2 as soon as possible. It is now available at
http://wordpress.org/download/The md5 of the tar.gz is b1ae0c152e60300cba8c40c030baafd4.
No announcement quite yet, but coming soon. Thanks for your help.
18 Jan, 07
In Changeset 4349, WordPress 2.1 lost the “jump to preview” / “jump to post” links. Aside from being damn useful, that changeset also broke the Kill Preview plugin.
Funny enough, the changeset log message was “Some UI cleanups, changes, and various miscellany.” So useful quicklinks that save a lot of scrolling are now ‘clutter’?
*reverts the changeset and complains*
11 Jan, 07
Are Snap.com actually paying people a lot of money, or why would wordpress.com think it’s a good idea to enable Snap Preview Anywhere on all wordpress.com blogs?
11 Jan, 07
The add-meta-tags WordPress plugin broke my WordPress 2.1 alpha site in more ways than one.
Update: Version 0.7 is out with fixes.
Anyway, here’s a (quick and dirty) patch against 0.6 to fix things.
--- add-meta-tags.php.old 2007-01-10 13:14:40.000000000 +0100
+++ add-meta-tags.php 2007-01-11 04:03:26.466994857 +0100
@@ -148,6 +148,7 @@
function amt_clean_desc($desc) {
// This is a filter for the description metatag text
+ $desc = stripslashes($desc);
$desc = strip_tags($desc);
$desc = htmlspecialchars($desc);
$desc = preg_replace('/(\n+)/', ' ', $desc);
@@ -218,10 +219,9 @@
if ( empty($site_keywords) ) {
// If $site_keywords is empty, then all the blog's categories are added as keywords
$my_metatags .= "\n<meta name=\"keywords\" content=\"";
- $all_cats = strip_tags(list_cats(FALSE, '', 'name', 'asc', '', FALSE, FALSE, FALSE, TRUE, FALSE,
TRUE, '', '', TRUE, '', '', ''));
- $all_cats_arr = explode("\n", $all_cats);
+ $all_cats_arr = get_categories();
foreach ($all_cats_arr as $cat) {
- $my_metatags .= strtolower(trim($cat)) . ', ';
+ $my_metatags .= strtolower(trim($cat->category_nicename)) . ', ';
}
$my_metatags = rtrim($my_metatags, " ,\n") . "\" />\n";
} else {
If you don’t have patch available, here’s the changed file (rename to .php).
I’m not quite sure whether the stripslashes is good there of if the bug comes from the admin panel, but frankly, I don’t care. I have other things to do.