March 29th, 2008

Wordpress 2.5 has released, including the bad markup generated with the Gallery option. If you serve your pages up as XHTML, the gallery won't work for you. You will get invalid markup errors, the page will fail to load. Whether this can be fixed with a plug-in or not, I don't know.

I've been told that if I don't like the code, shut up, and *fix it myself. Leaving aside the "shut up" part, the issue isn't just one problem in one piece of code–it has to do with a mindset. Last time I looked, you can't submit a bug patch to change a mindset.

I did turn in a bug about the Gallery markup, and really did expect it to be fixed. Two people involved in Wordpress 2.5, Jeffrey Zeldman and Matt Mullenweg have professionally benefited by their association with WaSP and the standards movement. If I seemed harsh in my previous writing on this, it is because I really did expect better from both Jeffrey and Matt. I think, though, my expectations don't match today's reality. Today's reality is XHTML is out, HTML5 is in. HTML5 is much more marketable. HTML5 is sexy, HTML5 is hot, HTML5 sells.

I know many of my readers are tired of me bringing up standards and XHTML. On and on–I have become dull with repetition. Heck, I've just become dull. Several people have pointed out the draconian error handling of XHTML, how HTML5 is friendlier, and will "make things better". HTML5 will make the web more "semantic". HTML5 is the way of the future.

How can the web be better, though, when people who do know how to create valid web pages, choose to not do so because frankly they just can't be bothered? How can HTML5 make the web more meaningful, when it can't even guarantee something as simple as accuracy of syntax? As the spec is now, HTML5 is also a closed box, with no way to add something new, something different. With XHTML, I can add SVG, or RDF, or NextBigVocabulary, or ShelleysSecretSauceVocab, and it works, out of the box. You can't do that with HTML5. Is HTML5 really a way forward? Or just a way for application developers to continue dishing out crap–but gee wiz, look, you can store data on the client now. And if you make a mistake, you won't kill kittens, because goodness knows, every time Firefox displays the Yellow Screen of Death, God kills a kitten.

Firefox's YSOD kills kittens

I once before referred to today's attitude about standards as being a race to the bottom. I made this statement because standards support is seemingly a thing of the past, a quaint relic of a previous web generation. The new web, the 3.0 web, the semantic web can't be bothered with the old, the measured, and the fusty, when now is a time of quick ideas and even quicker implementations. Open Social! Open Data! Microformats! All you need now, is an idea and an audience. It doesn't have to be a good idea, either, but it does have to have a big audience.

It is what it is, and I don't have enough audience to impact much beyond my immediate vicinity. Thankfully for the riders of tomorrow's web, when they do reach the bottom, HTML5 will be there, waiting for them. And who knows, I could very well be all wrong about all of this. Rather than a race for the bottom, perhaps this is a race for a baseline, and I just perceive the baseline to be less than what I think it can be. Perhaps I do reflect an era that is dead and gone and either I should adapt to move with the tide, or get out of the boat.

Well, I've not been particularly good at floating with the current in the past, so the only option for me is get out of the boat–or at a minimum, go find my own boat to row. I am going to do the Wordpress folks a huge favor: I won't continue using Wordpress, no matter how pretty the new look, or how cool the new features. The Wordpress developers have made too many decisions about how I should run my site, including HTML5 over XHTML, microformats over RDF, the canvas element over SVG, and so on. I find I just don't want to follow the course they've deemed appropriate for the future. Or, to continue my nautical metaphor, we've reached an equatorial point, and Wordpress wants one horizon and I want another and now, regretfully, we must part.

I am not unmindful of how much I owe the Wordpress team for an application I've benefited from for several years. To the Wordpress team, my sincere thanks for the use of your application, and your hard work in the past. Wordpress has been both fun, and useful. Good luck with your future voyages.

*If you want to use the Gallery yourself and you serve your pages up as XHTML, you can fix the gallery page so that it doesn't break in the browser with this PHP file. Just rename it to media.php and overlay the one in wp-includes. You'll also have to turn off automatic entry formatting, too, because Wordpress will insert paragraph elements erroneously. The Text Control plug-in will help you with turning off auto formatting, and it works with WP 2.5. The generated layout also plays havoc with IE8, at least with my layout. Your mileage may vary.

The generated markup still isn't valid because of adding a stylesheet into the gallery within the page body, but with the changes I just detailed, at least it doesn't kill a kitten.

Comments
1
Ian Hickson - 5:28 pm March 29, 2008

What is "accuracy of syntax"?

2
Shelley - 5:42 pm March 29, 2008

It doesn't kill a kitten, Ian.

PS Sorry Ian.

If a specification builds in forgiveness for something like a break element without requiring an ending forward slash, those of us who want to run things in XHTML will not be given the chance because content generating applications will go the easy route. At a minimum, if they use a 'forgiving' environment, they may not even be aware of the havoc they cause.

Something like <br /> works for both HTML and XHTML — that should be the lowest common denominator.

What does the HTML5 spec say?

The second concrete syntax uses XML, and is known as "XHTML5". When a document is transmitted with an XML MIME type, such as application/xhtml+xml, then it is processed by an XML processor by Web browsers, and treated as an "XHTML5" document. Authors are reminded that the processing for XML and HTML differs; in particular, even minor syntax errors will prevent an XML document from being rendered fully, whereas they would be ignored in the "HTML5" syntax.

I don't think we can talk about one spec with two different serializations any more. I think the entire idea is failing. And I think more harm than good will come out of this failure, and examples like what happened with Wordpress will continue to happen way into the future.

I genuinely don't believe you can have one version of a spec that's forgiving as all heck, and the other strict–and say they are the same thing.

Maybe I'm just tired and lack imagination.

3
Chuck - 6:33 pm March 29, 2008

Wow. Thought I was grumpy!

Seriously, I agree about the mindset thing, I've griped about that too, does zero good.

They'll learn the hard way.

4
Bud Gibson - 7:50 pm March 29, 2008

You inspired me to review namespaces in xml. Truth of the matter is that the issue is there. Simply stated namespaces, while a good idea, have too many options, and figuring them out is like solving a logic puzzle, each and every time.

If namespaces were simplified so that there was always one default namespace and all namespaces had to be declared for the whole document, things would be a lot better. They'd be better still if the prefixes were pre-designated for certain vocabularies, like svg.

In my experience, writing and teaching html is pretty simple, not like solving a logic puzzle. Use p elements for paragraphs, ul for unordered lists, etc. Most people can get that without too much problem, and many people like it.

So, I guess my point of view is that the central issue for xhtml adoption is namespaces (which have the big plus of allowing the insertion of arbitrary vocabularies). If you feel the namespace issue is unsolvable (because, try as they might, only a few people are good at logic puzzles, and they are, for the most part, not your coders), you go for html5 and microformats. If you want to be able to insert arbitrary vocabularies, then namespaces are for you. I think a middle and likely productive road would be to reform namespaces in the way I described above. Non-logic-puzzle-people would have a fighting chance with that idea. Namespaced elements would just be another kind of element they could study, and they would always be the same. None of this having to define it yourself and having many options that can be arbitrarily different (because that is what could pass committee).

I realize this discourse could seem a bit off topic, but it is in response to your disappointment at the direction of Wordpress 2.5 and Mullenweg's and Zeldman's role therein. Mind you, their non-xhtml-conformant linking of the stylesheet in the gallery just sounds sloppy, but there's likely more profound justification for why they are not enthusiastically pursuing xhtml 1.1 conformance. They stand on the opposite side of you in terms of namespaces. Who can blame them? It seems hard enough just to get stylesheet linking right.

5
Shelley - 8:55 pm March 29, 2008

Chuck, not grumpy–resolved.

Bud, an interesting way of looking at it, but I'm not sure that's only the issue. I think Ian would agree with you though, because that's one of the issues the HTML5 is currently looking at, and a major sticking point about HTML5.

As I wrote in Zeldman's post comments, I am incredulous. Two people involved with WaSP have collaborated on software that generates markup that results in 301 HTML errors. That's 301 HTML errors. This from members of a a group I tangled with years ago about because at that time I counseled patience in regard to standards.

Seven years ago the WaSP started a campaign to get everyone to develop their web pages only for those browsers that conformed to standards. I found the following in an article from that time:

A coalition of developers issued a call on Friday for Internet users to upgrade their browsers if they want to make the most of the Web.

The Web Standards Project (WaSP) said its goal is to encourage developers to use standards, such as those published by the World Wide Web Consortium (W3C), even if the sites they build can’t be called up from non-compliant browsers.

“We’re hurling a hammer at the glass screen and hastening the arrival of a standards-compliant Web,” said Jeffrey Zeldman, WaSP co-founder and current group leader. Developers have been asked for six years to build sites that work for every browser, he said, leading to fragmentation of the medium and adding 25 percent to the cost of site development.

“Every site we build this way fractures the Web, retards its progress, and alienates users of non-traditional browsers that require structural markup to function correctly,” Zeldman said.

Three hundred and one HTML errors. No, it's time for me to move on to other tools, and other topics, because frankly, I've begun to bore myself. Talking to a wall and all.

6
Jacques Distler - 9:15 pm March 29, 2008

I can't even edit my own typos now–the functionality to allow editing of comments has been removed entirely from Wordpress 2.5. Even if you're an administrator.

You're joking. Really?

7
Shelley - 9:17 pm March 29, 2008

I just found it. You have to click on the avatar to bring up the comment for editing. There is nothing labeled "edit comment", and I only clicked on the avatar because I was clicking everything to try and edit a comment.

8
Daniel O'Connor - 11:49 pm March 29, 2008

Psst, Shelly… got a link to the bug report?
Or tried the mailing list?

Regarding the mindset, one of the things which helped set me back on the right course is a HTML validator addon for firefox.

Also; not to be nasty/etc but:
line 100 column 154 - Error: required attribute "alt" not specified

9
Shelley - 12:02 am March 30, 2008

Sent a note about the problem to the email list. Emailed with Matt. Communicated with Matt in comments in other weblogs. Wrote weblog posts. Fixed code, and added to this post.

I used the Web Developer Tools HTML validation, and I also serve this page up as XHTML. The latter sure helps me catch most problems.

Thanks, fixed the alt. Unfortunately with Gallery, I had to hack the code to fix the errors.

You know, it wasn't the bugs so much–there is no such thing as perfect code. It was how easily these errors in markup could have been seen if one of the developers had only, once, run a gallery page through validation. Just once.

10
Shelley - 12:05 am March 30, 2008

Different email list. No, I'm not going to join the hackers list. That's, frankly, a silly thing to have to do–subscribe to a hackers list just to submit a bug. I submitted a feedback note to the email address given out with the RC1. If that's not sufficient, frankly, I don't care. If the Wordpress folks don't care, I don't care.

11
Elaine - 9:43 am March 31, 2008

Because the discussion itself just makes me too despondent….

I love that SVG with the woman in the boat! Where did you find that?

12
Bud Gibson - 12:42 pm March 31, 2008

It strikes me that the big issue here is the architecture of wordpress. Somehow, reading your account, plugins directly inject markup in the page.

bad.

Step back, Shelley. Abort.

Consider either Django or Movable Type. From what I've been able to see, you run a pretty standard weblog here from a CMS perspective. You write posts and receive comments. Perhaps there is some kind of FOAF file in the background.

However, you innovate in the area of design (e.g., background svg) in ways that require pristine markup. Either Django's or Movable Type's template systems are better suited to your type of experimentation. Both have a nice separation between logic and markup. Django, as a somewhat spartan, python-based web programming framework, may have more of an appeal.

With MT, you profess not to have had your fill of perl. However, I suspect you could write plugins for most of what you do in PHP.

In fact, my observation is that most of the image processing and style computation things you do might be best done apart from the CMS in standalone mode.

Rests comment processing which probably has to be done in the CMS (but see disqus), hence my rec for Django, but I'd encourage you to be a little more open about MT. You'd be happier on another CMS, and I would get more posts about innovation. A win for both of us.

13
Shelley - 1:22 pm March 31, 2008

Elaine, isn't it wonderful? I plan on incorporating it and many more of the black and white converted SVG images from Open Clip Art. Plus, I'm converted several of my own. That Vector Magick is great at this–I just wished it wasn't so expensive now.

Bud, yes, most of the wordpress plug-ins I've seen either generate content that isn't valid, or they crash the administration pages if you run them as XHTML. I haven't seen one yet where the creator has run their plug-in interface through a validator. It's something I've been really at Matt about. It's just not going through.

Drupal isn't perfect, but the first page at my test site validated as strict XHTML without having to change a thing. Plus, there's some connected work that interests me.

I'm going to take my time and really think about what I want from my pages before I grab tools. It's really better to architect your site, and then shop for tools, rather than grab tools and force your site into the tool environments.

14
Asbjørn Ulsberg - 7:51 am April 2, 2008

Does this really have anything to do with HTML versus XHTML (no matter which version of either)? Isn't it about validity versus invalidity at the syntax level? I mean, a stylesheet linked in the HTML BODY isn't valid in any HTML dialect I know of. Is an out of the box installation of WordPress 2.5 valid with the new gallery gump enabled at all?

15
Shelley - 8:11 am April 2, 2008

That is a very good point. I mention XHTML because XHTML is more vulnerable for invalid content, but the content is invalid whether it's viewable or breaks.

Tthe wordpress developers are adding plug-in points for all of the code, and anything anyone doesn't like, can get changed via plug-in.

What's happening, though, is that they're now using plug-ins to "fix" code. Fixing application bugs was not the original intent behind the philosophy of plug-ins.

16
Asbjørn Ulsberg - 6:44 am April 3, 2008

(Markup) bugs in the core of WordPress should of course be remedied by a patch, checked in to SVN, not by plugins. And it doesn't really matter what HTTP Content-Type the blog is served with; an error is an error whether you get the YSOD or not. Have the WordPress developers even heard about the validator?

17
Matt - 5:40 pm April 3, 2008

Yes! We have heard of the validator and bugs pointed out in this post have already been fixed or are in process.

18
Shelley - 9:23 am April 4, 2008

That's good, Matt.

The issue isn't that the page doesn't validate so much as it breaks if a person makes a choice to serve their pages up as XHTML. Burningbird currently doesn't validate because I'm introducing new XML vocabularies that aren't covered by the DOCTYPE, but it doesn't break because I'm using well formed XML.

Well formed syntax by the strictest standards (XHTML, not HTML), checking input for bad characters, giving people an option of serving their pages up as HTML, XHTML, or a hybrid of both (for IE) are all options that can only add value for your tool. They're a heck of a lot more important than widgets and what not, even though people may not know to ask for these capabilities in the tool. People shouldn't be concerned because it should be transparent. Well, other than an option to set HTML mime type in the options page.

Good luck, and I hope future versions are a success for you.

Thanks to all those who have contributed to the discussion. Comments are now closed, but you can contact the author of the post directly.