Comments no longer broken
Update 3: not sure how sound an idea this is, but I’ve now re-loaded beta 3, but with the comment-template.php from beta 2. It seems to accept comments, and I haven’t found anything else broken so far, so we’ll see what happens.
Update 2: the culprit file - comment-template.php - seems to have changed quite extensively from beta 2 to beta 3. Beta 2 does not give the same error, so that’s what is currently powering The New Wolfs Howl comments. I’m loathe to give up the much improved dashboard of 2.7 and return to 2.6.3, so I’m gonna go back to beta 2 for a while.
Update: well, couldn’t work out what exactly was causing the problem but looks like it was something to do with WordPress 2.7 Beta 3 because now that I’ve gone back to 2.6.3 the problem has gone away.
It may not be the beta software itself that is causing the issue; it could be an incompatible plug-in or theme but I wasn’t able to find an obvious culprit during my testing, so I’m putting it down to the beta curse!
Original: Thanks to Gareth for notifying me of this.
If you try to comment on any posts, you’ll probably get the following error (or one very like it):
Fatal error: Call to undefined function: htmlspecialchars_decode() in /home/wolfieb/public_html/wp-includes/comment-template.php on line 802
Your comment will still be submitted, though, and if you refresh the page everything should go back to normal. I’m currently looking into the issue and it’s probably either a problem with the beta version of Wordpress that I’m using, or it’s an issue with my theme not liking the the beta software.
I’ll keep this post updated with changes as they occur.
New stuff
One of the reasons that I’ve been a bit lax with SOTD this week is that I’ve been playing with a couple of bits of new software. And we all know how that just eats up the time, don’t we?
One of these might be of interest to my fellow bloggers - the beta release of WordPress 2.7. Coming as quickly as it has on the heels of 2.5, which was a major re-vamp of the software and introduced a brand-new dashboard, you wouldn’t expect 2.7 to bring too many changes. But boy, would you be wrong!
2.7 is hugely different from 2.5 - but in a good way. The dashboard has again been completely re-designed. This was, I think, in response to the negative comments that attended the 2.5 dashboard which seems to have been fairly universally disliked. The 2.7 dashboard, on the other hand, is a joy to work with. Its left-hand navigation menu is simple to use, and it’s more obvious where everything can be found. And it’s there whatever screen you’re looking at, rather than changing from one screen to the next.
In general the layout of screens has been overhauled to make everything more obvious and make the whole dashboard easier to use and less of a fight to get the simplest thing done.
Other changes that I’ve found so far that are really useful? Quick Edit lets you adjust categories, tags, time and date stamp, etc on a post without having to open the post and you can now reply to comments from the comment screen without needing to add any plug-ins (why hasn’t this always been part of the WordPress software).
If you haven’t checked it out yet (and are prepared to be adventurous - this is beta, after all) why not go and download WordPress 2.7 now? Have fun….
XML file too big to import
Part of “Going self-hosted with Wordpress : A Wolfie Guide”
On one of my older posts (Going Self-Hosted with Wordpress) Lisa has asked a question about how to import a larger than 2MB XML file into her new self-hosted WordPress installation, from her existing WordPress.com blog.
The first thing to say is that this is not a WordPress restriction, it is a restriction of the hosting company being used. If you have cPanel loaded on your host, take a look in ‘PHP Configuration’ and you’ll see that ‘upload_max_filesize’ is set to 2MB. (For some hosts this number may be smaller or larger; as always, your mileage may vary). There is a way that you can change this value, although I’ve only managed to make it 8MB on my server. (Before going ahead and making any of the changes that follow, please make sure that you have a working back-up of anything that you can’t afford to lose - just in case. I will not accept any responsibility for anything that goes wrong with your system and make no promises that any of these methods will work for you).
In your public_html directory, there should be a file called .htaccess. This is a small text file that, at least on my server, looks like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
If you add the line php_value upload_max_filesize 32M just before the final line, then when you go to the import screen you’ll be told that the maximum file size is 8MB. Whether the system will actually allow you to import an 8MB file is a different question and I have not been able to test this. Assuming it does work, once you’ve uploaded the XML file I suggest re-editing the file to take out the alteration.
If that does not work, then as far as I’m aware, you can’t change this setting yourself but your hosting company should be able to change it for you. If they can’t / won’t, then you need to look at a different solution which involves splitting the XML file into several smaller pieces.
Once you’ve got your exported XML file (to get this, from your wp.com dashboard go to ‘Manage’, then click ‘Export’. You get the option to restrict authors, but this won’t apply to most people. WordPress then saves an XML file to your hard-drive), you need to open it up in a text editor. I use TextWrangler - because its free and because it helpfully colour-codes tags, etc - but anything should work, even WordPad. What you’ll see is a huge list of text, with lots of things in tags (which are things like <channel>, <rss>, <item>, etc). All this text is what WordPress will use to reconstruct your blog on your new installation.
But that upload limit is a bit of a pain. I didn’t experience this issue when I moved The New Wolfs Howl because the export file was quite small (even now it’s only 1.4MB) but after a quick search around the forums it seems that this is quite a common problem. Unfortunately, splitting the XML file is not quite as simple as putting the second half of the file in a different document; there are certain things that have to be in each file.
The first thing to do is to work out how many files you need to split the file into. If your upload limit is 2MB and you have an 8MB file, then I would suggest you need to have five files - I know that eight divided by two is four, but I’ve added one to take care of the overlap. That will then give you a rough idea of who much of your file has to be moved each time. For example, my XML file is just over 21,500 lines - so I’d want just over 5,000 lines per file.
Take a look at your XML file and at the top you’ll see there are various items of header code (instructions from WordPress, etc). From the top line of the file (<?xml version=…) to <wp:base_blog_url>http://… needs to be in every file. Scroll right to the bottom of the file and </channel> and </rss> also need to be in every file. So, before any content has gone in, you want an XML file that looks like this:
<?xml version=”1.0″ encoding=”UTF-8″?>
<!– This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. –>
<!– It contains information about your blog’s posts, comments, and categories. –>
<!– You may use this file to transfer that content from one site to another. –>
<!– This file is not intended to serve as a complete backup of your blog. –>
<!– To import this information into a WordPress blog follow these steps. –>
<!– 1. Log into that blog as an administrator. –>
<!– 2. Go to Manage: Import in the blog’s admin panels. –>
<!– 3. Choose “WordPress” from the list. –>
<!– 4. Upload this file using the form provided on that page. –>
<!– 5. You will first be asked to map the authors in this export file to users –>
<!– on the blog. For each author, you may choose to map to an –>
<!– existing user on the blog or to create a new user –>
<!– 6. WordPress will then import each of the posts, comments, and categories –>
<!– contained in this file into your blog –>
<!– generator=”WordPress/2.5.1″ created=”2008-07-12 05:47″–>
<rss version=”2.0″
xmlns:content=”http://purl.org/rss/1.0/modules/content/”
xmlns:wfw=”http://wellformedweb.org/CommentAPI/”
xmlns:dc=”http://purl.org/dc/elements/1.1/”
xmlns:wp=”http://wordpress.org/export/1.0/”
>
<channel>
<title>Your Blog Title</title>
<link>http://yourblogdomain.com</link>
<description>Your blog descriptions</description>
<pubDate>Fri, 11 Jul 2008 19:33:37 +0000</pubDate>
<generator>http://wordpress.org/?v=2.5.1</generator>
<language>en</language>
<wp:wxr_version>1.0</wp:wxr_version>
<wp:base_site_url>http://yourdomain.com</wp:base_site_url>
<wp:base_blog_url>http://yourblogdomain.com</wp:base_blog_url>
[this is where the content will go]
</channel>
</rss>
So, now you need to get your content in there. In the first of the XML files, you’ll want to make sure that you include your categories and your tags; these are listed immediately after the <wp:base_blog_url> line. They only need to be included in one file. Then the rest of the file is filled up with content; just look for <item> and </item> tags and cut and paste information between files. Always make sure you only copy complete items, though, otherwise you’ll have an error.
This way of splitting files is a laborious process and will take a fair while, but will work if you do it properly. There are file splitting utilities out there, but I have not tested any of them for effectiveness (or simplicity).
Brief Notes
Sorry for the lack of posts over the last few days (I really have failed that Blog365 challenge, haven’t I?) but I was working over the weekend and didn’t really spend too much time in front of the screen for most of the last five or six days. Also, I think I’m going through one of those periods where nothing is really flagging up as being worthy of spending the time to write about; I find that I’m not one of those bloggers who can just sit in front of the machine and write - I have to have something that I want to say, or a news story I want to comment on. So this is just going to be another in my series of Brief Notes posts.
1. Ozh has updated his updated Absolute Comments plug-in, which caused me some confusion for a while. In version 2.1, he’s created a separate my_options.php file for holding some of the user settings (they used to be in the main file). Initially, I thought he’d dropped support for threaded comments, but then after checking out his website I realised what he’d done. If you don’t use this plug in already, check it out - it makes replying to comments on your blog so much easier.
2. In related news, WordPress 2.5 continues to be rather underwhelming. It’s not causing any problems for The New Wolfs Howl, but I haven’t really come across any of the new features that were so trumpeted at the launch. But it seems to be stable, which is good.
3. We’re coming towards the end of the football season. Eastbourne Borough have two away games left to play, and it’s tight at the top of the table. Only one point behind leaders Lewes (but they’ve got two games in hand), it is mathematically possible for us to win the league. Of course, we need Lewes to do quite badly in their last four games and I’m not sure that’s going to happen. But if we don’t win, we’ll get a play off position so will still have a promotion chance.
4. I’ve been listening to a lot of internet radio recently - specifically, Virgin Radio Classic Rock. It’s old school rock (with some grunge thrown in every now and again - be warned) and has just played me Radar Love followed by Queen’s You’re My best Friend. If you ever listened to a radio show hosted by Tommy Vance, then you should really check it out.
Making the switch
Despite what I said in my previous post, I’ve gone and updated my WordPress installation to 2.5. The trigger for this was that one of the plug-ins I’d been waiting for (Ozh’s Absolute Comments) has now been updated. I used Fantastico to do the update - so much quicker than downloading the new version and then uploading it to my server (why does FTP take so long?) - and all went smoothly.
Having now used 2.5 in anger, as it were, rather than just on a local install I’ve been able to give it a bit more of a test and to find a bunch of things that I don’t think are really all that good. Let me run you through some of them:
Colour scheme: that new default colour scheme is so wishy-washy. It looks like its been left out in the sun too long. First job I did was to head to Users \ Your Profile and change to the classic colour scheme, which is at least a little better.
Dashboard: this has been improved - a bit more focus on your blog, rather than Wordpress - and is now widgetised. What you don’t get, though, is any way to manage the widgets. You can edit some of them, so that they show you different content, but you can’t turn them on or off. So another plug-in was called for - Dashboard Widget Manager. This is a great little plug-in that lets you control the Dashboard widgets in the same way as you do the widgets on your blog. So I’ve turned off most of the widgets now and have a lovely streamlined Dashboard.
Tags: when I first looked at 2.5, I thought it was great that they’d finally properly integrated tags as well as categories (after so long of WordPress thinking they were interchangeable items). But when you use the online editor to write a post, you don’t get a list of previously defined tags to choose from, so it becomes a little pointless to keep a track of them.
Widgets: this one seems to have been giving some people on Wordpress.com a bit of trouble. Management of widgets has had a major overhaul and, while on the whole it is not too bad (really just a re-designed layout) the one big bugbear with it is that you can only see one sidebar at a time. Fine if your blog only has one sidebar, but a pain if you have two. I quite like the new layout, but would prefer to be able to see both sidebars at the same time like I could with 2.3.
I’m sure there must be some good things about 2.5 that I haven’t come across yet (and there are a couple that I’ve already noticed - better support for Safari when using the Visual Editor and an attempt to offer tag management) and when I find them I’ll you know.

