Drupal duplicates Content Type metatags

You may have noticed if you have looked at the page source of Drupal sites that they often have two content type metatags

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Homepage | Page Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

This is a remnant of a security fix to ensure that the page always had a content type. (you can read all about it here http://drupal.org/node/451304

Drupal Ubercart - Changing your 'cart' to your 'basket'

If you use the Ubercart module suite for Drupal to create e-commerce sites (we do and love it!) then one of the things you may wish to do is to change the default 'cart' to 'basket' - for a non-US audience. There is no setting in the Ubercart modules to enable this - but it is really easy and here's how to do it.
Get the excellant string overrides module and install it. Then set it up to swap the following fields:

Original - Replacement
"cart" -> "basket"

Working with large (Drupal) taxonomies

Drupal is great and the taxonomy system is great - but large taxonomies (over 1,000 terms are a headache for any system) and Drupal is no different. I have a new taxonomy for a project with > 5k terms in a three deep hierarchy and using it presents some usability, performance and other issues.
So I though I would take a break and write a bit about evaluating some Drupal contributed modules for working with large taxonomies:

handling 404 errors on hosted CMS

A general housekeeping task for CMS systems such as Wordpress and Drupal and other websites and good practice to keep your site SEO high is to make sure you are gracefully handling missing pages (404 errors).
One of the routine tasks to carryout is checking for crawl errors in Google Webmaster tools. If you see any missing pages in the list it is worth making sure you have some measures in place to handle these and ideally issue a 301 redirect so that Google and other search engines update their indexes.

Safe guard your web site with routine web log analysis and forensics

Whether you are running Drupal,Wordpress, Expression engine, Joomla or in fact any web site one of the regular tasks you should carryout on your web site is a bit of log analysis. It is often left up to modules, plug ins or someone else to protect your web site until it too late.
We all rely on Google Analytics to tell us about visitors and maybe use our log analysis software (AWStats, Webaliser etc) to report on log entries - but it is always worth using tools locally to dig deeper into your logs. These can range from simple reports on accesses to your site to more detailed forensic analysis of site activity.
By doing this we get to know better how visitors are accessing our site and can uncover some interesting answers to questions such as:

  • How often is Google actually spidering my site?
  • How many errors am I getting and what are they?
  • Who is stealing my content?
  • Is anyone trying to crack my site?

In this post I will briefly cover some useful techniques to analyse you logs and see if any one is abusing your hospitality.

Trouble shooting Cron?

It ducked!
Monday morning the sun is shining and your email box is full of emails saying cron is failing on one of your sites.
In this post I will look at what is going on, how you can troubleshoot it and fix it and how life may be made easier in the future by a) adding a bit of logging to cron and b) features in Drupal 7.

Customising your Drupal maintenance page

Drupal's standard off line pageSo you have created your Drupal site,configured to be as search engine friendly as you can, added loads of good content and all is well - traffic is building up and you are getting great feedback from regular visitors. Then some updates to your modules are available and you need to put the site into maintenance mode whilst you upgrade these - and that is when you find that the maintenance Site Offline page is in the classic minelli theme and that isn't what you want at all. In this post I will show you how to theme your maintenance pages in under 5 minutes with 3 simple steps.

Adding thumbnails to WordPress posts

One of the features of Wordpress 2.9 was the addition of support for Thumbnails in posts. One of the frequent question we get is How do I show thumbnails in posts?

If your theme supports thumbnails then on the post edit page you will see a Post Thumbnail box at the bottom of the right column.

If your theme doesn't 'natively' support thumbnails - you can fix it with a few lines of code.

The first thing to do is to locate the functions.php file in your theme directory and add the following snippet:

Module Weights

Some modules use the same hook and therefore are 'called' in succession. Sometimes you would like (need) a particular module to fire after or before other modules. An example is the XML site map module that would best fire after the pathauto module to ensure that the site map contains the final version of the urls used for pages in your site. There are a number of ways to manage this -

Linking your Wordpress blog to Twitter

In this post I'll look at using a couple of Plugins to link your Wordpress site to Twitter. This is a great way of publicising your blog and letting your viewers keep up with what is going on on your site.