apocryph.org Notes to my future self

10Dec/081

Finally moved from DreamHost & Drupal to FutureHosting & WordPress

If you’re reading this, I’ve moved apocryph.org over to FutureHosting, and I have finally migrated away from Drupal and into WordPress.  Right now I’m running the stock skin and I haven’t done any configuration apart from migrate in my Drupal content and set up the Permalink Redirect plugin so the old Drupal-style links continue to work.  As time permits I’ll be porting my custom Drupal theme into WordPress and generally adapting the look and feel to my tastes.  Here’s hoping I don’t regret this…

Note that subdomains like svn.apocryph.org and wiki.apocryph.org haven’t been migrated over yet, so you’ll have to bear with me for a little while.

5Jul/082

Set up OpenID Delegation on Drupal

I finally decided I wanted to set up an OpenID ID attached to the URL of my personal website, apocryph.org. I just set up an account on MyOpenID, installed the Drupal OpenID URL module, and configured it to point to my MyOpenID URL.

I set OpenID Server to ‘http://www.myopenid.com/server’, OpenID Delegate to ‘http://codebloc.myopenid.com/’, and OpenID XRDS Location to ‘http://codebloc.myopenid.com/xrds’. And that was it. Now http://apocryph.org is a valid OpenID. Too easy.

16Mar/082

Requirements for Drupal migration tool

After my flash of insight I’ve decided to build a tool to help me migrate apocryph.org away from drupal.

Requirements are:

  • Work with my Drupal configuration
  • Not so tightly coupled to my Drupal configuration that no one else can use it
  • Output posts in a neutral format that users can post-process and import into other tools
  • Preserve all the important elements of each post, including:
    • Formatting. Most posts are in Markdown, and a few are in SmartyPants. Those must be converted to XHTML using the same rules which generate the markup in Drupal
    • Files. A few of my posts have files attached, usually images but sometimes other stuff. Those files must be preserved themselves, and any references to the files from within a post (like IMG or A elements) must be preserved as well
    • Metadata. The tags, author, timestamp, published/unpublished flags must be preserved
    • Links. I often link between posts, and the migrated output must preserve those links. They can’t go away or be 404
    • URLs (ideal but not required). Notwithstanding the above requirement to preserve intrasite links, it would be vastly preferable of the actual URL of each migrated posting could be preserved so any existing links to pages on Apocryph are preserved.
    • Comments. Existing comments attached to posts must be preserved in their entirety.

Right now I’m looking at the WordPress eXtended RSS (WXR) format. It build on the standard RSS format with additional WP-specific tags, which I think will accommodate my requirements. As an added bonus, WordPress has built-in import support for WXR files, so I can easily suck the resulting file into WordPress, which I’ve selected as the successor to Drupal.

16Mar/085

Flash of insight: Why am I still using drupal?

After outsourcing comment processing to Disqus due to the lack of the Akismet module, fighting a buggy alpha version of the Views module for Drupal 6.0 to implement a front page that doesn’t use those damn teasers, and installing yet another security update using an update process that can best be described as a pain in the ass, I’ve finally asked myself why I use Drupal for what is basically textbook blogging.

The answer? Well, once upon a time, back in 2005, I had an HTML site that I’d painstakingly built, and I shopped around content management systems trying to find one flexible enough to let me reconstruct that look and feel in a theme. I looked far and wide, at WordPress, DotNetNuke, PHPNuke, MovableType, and just about every other CMS and blogging platform one can imagine. The only one with the flexibility I thought I needed was Drupal. I spent days getting my head around it’s ridiculously expansive surface area, cooked up a theme, and that was that.

Problem is, Drupal 6.0 is out and it feels like a step back. None of the modules I need work, and the system is unimaginably complicated, which is probably why lots of high-profile sites with unique requirements use it. However, apocryph.org is neither high profile nor possessing of unique requirements, and I’m now willing to accept a site redesign if it means I can use a blogging platform that Just Works.

Which brings me to the next problem: how in the hell am I going to get years of posts out of Drupal and into something else? Obviously the answer will involve me writing data migration code, which sucks and makes it less likely I’ll get around to it.

Still, I’m getting really tired of slogging through the Drupal mud.

14Mar/080

Desperately seeking comments alternative

The current situation with comments on apocryph.org is untenable. Before I upgraded to Drupal 6 I used the Akismet module to catch comment spam, which meant I could safely allow anyone to post comments without authentication or approval, with reasonable confidence that akismet would catch the spam before it got posted.

That worked great, but the Akismet module hasn’t been ported to Drupal 6, and I’m beginning to think it’s not maintained anymore since the dev snapshot hasn’t been updated since September. Right now I have comments enabled but they go to the approval queue, which I just spent half an hour cleaning out due to the torrent of spam comments various spambots keep posting.

I know there are hosted comment solutions with AJAX goodness and spam filtering, but I really prefer to host my own, plus I must be able to keep the existing comments already posted through Drupal. Oh, what to do!

17Feb/080

Upgraded apocryph.org to Drupal 6

Today I took the plunge and upgraded apocryph.org to the latest version of the Drupal content management system. Drupal 6 has been in the works for what seems an eternity, and has a number of big improvements which made it hard to resist. Unfortunately, I now somewhat regret the decision, as there were considerable gotchas to cope with.

Of course, I started out with a complete backup of my Drupal 5.x site and database, just in case. I went through the upgrade steps in UPGRADE.txt, but despite being logged in to the site as the root user, I had to bypass security checks by adding the $update_free_access = TRUE; line in sites/default/settings.php. The upgrade itself went fine, but as another consequence of Drupal seemingly ‘forgetting’ I was logged in as superuser, after the upgrade the site was still in maintenance mode, and I couldn’t log in to change it!

Fortunately this post got me out of that particular jam, but it was still a gotcha that was definitely not present the last time I did a Drupal upgrade.

The next gotcha was one I’d anticipated: Due to major changes improvements to the theming system, my custom Drupal theme that implements the distinctive apocryph.org look and feel sucks hard under Drupal 6. I had to compare it to one of the themes that ships with Drupal 6 to figure out what was wrong. The big thing was that themes now need a themename.info file that contains some metadata for the theme. Since my theme uses custom regions, I also had to declare the regions in the .info file. Apart from that it was things like $language being an object instead of a string, and similar stuff. The Converting 5.x Themes to 6.x page helped alot, as did the writing .info files for themes page.

Once the theme was working, I set out to install the 6.0 versions of the various modules I use to run apocryph.org. Here I was in for an unpleasant surprise. The following modules were used in Drupal 5.x, and are not (yet, anyway) ported to Drupal 6:

Since akismet and commentrss aren’t available, I’ve had to disable anonymous comments to avoid a deluge of comment spam. Without gsitemap Google has to crawl my site the old fashioned way and won’t pick up the structure of the site. The other modules I can live without.

Once I was resigned to the limitations imposed by the missing modules, I pulled up the site as an anonymous user to make sure it looked ok. Imagine my surprise to find that the site was blank! When viewed as an authenticated user all my content from the last two years was there, but to an anonymous user, the site looked empty. I tried pasting in the URLs to some of my blog posts into the anonymous browser window, but they all came back “access denied”. The Drupal log reported the access denied errors, but didn’t offer a clue as to what caused them.

I suspected this had to do with the fact that I ran Drupal 5.x with the taxonomy_access module, which let me specify access control rules for different vocabularies. Since this wasn’t in 6.0, I thought maybe the taxonomy_access module might’ve left some cruft in the Drupal database that was messing up the access control rules.

I did a little poking around, and ran into this support request for taxonomy_access. It turns out you have to go to Administer | Content Management | Post settings and click the Rebuild Permissions button to clear out access control cruft left over by taxonomy_access. Once I did that, all was well.

I hope the modules I need get ported to Drupal 6 soon, so I can reopen anonymous comments. In the mean time, I’ll try to convince myself all the spiffy new Drupal 6 features were worth the hassle.

UPDATE: I also had trouble with the pathauto module. The configuration left over from Drupal 5.x used token names like [user] and [title], but the new 6.x version of pathauto issues errors strongly urging you to use [user-raw] and [title-raw] instead. What’s more, it was configured to use the underscore (_) as a separator character in the generated paths, but was also defaulting to removing underscores from path names. I don’t know how it got that way since I wouldn’t have set that up in Drupal 5.x, but I changed it to leave underscores in place.

17Feb/080

Test post

I just upgraded apocryph.org to Drupal 6, and it’s not going so well. This is a test post; I’ll post a detailed AAR later.

29Aug/070

Updated apocryph Drupal theme

I’ve made some minor adjustments to the apocryph.org Drupal theme. The original apocryph theme was based on a ripoff of the built-in Drupal 4.x theme, and was showing its age. It wasn’t compatible with some nice Drupal 5.x features like autocompleting tag names, and auto-collapsing form field groups. Mostly the enhancements are to the posting side of things and thus benefit me exclusively, but while I had the hood up I tweaked a few colors to make the site look a bit less like a Spartan military barracks.

21Aug/073

Tired of blog spam; installed akismet module

Lately I’ve been getting a torrent of comment spam on apocryph.org. No one else sees it because I’ve enabled comment moderation, but it’s a chore for me to purge all the spam posts all the time. I had installed Drupal’s CAPCHA module, but it provides only a lame arithmetic challenge, which apparently the spam-bots can defeat.

Now I’ve installed the akismet module which uses the Akismet service to check for comment spam in real time. I’ve not used it before but it seems well-regarded in blogging circles, and it can’t be worse than what I have.

Normally I wouldn’t support torture as a means of punishment, but I wouldn’t mind at all if the assholes responsible for all this blog spam were convicted of child molestation and rendered to Saudi secret police for re-education.

19Mar/070

Something amiss w/ Drupal content

There seems to be something screwed up w/ Drupal atm. Only my last blog post shows up on the front page or when listing my blog posts, but all the others are still on the site, and reachable by their respective URLs. I’m investigating now; nothing’s changed, that I know of.

UPDATE: I’m an idiot. My mall ninja post was being chopped off at an unfortunate spot to form the teaser, and the resulting markup had all subsequent article links rendering improperly (that is to say, not at all!).

Delicious Bookmarks

Recent Posts

Meta

Current Location