Joomla 2.5 upgrades and templates – “cannot delete last style of a template”

No Comments »

I’ve recently been upgrading a few sites to Joomla 2.5 and came across an issue where I could not delete unused templates. I had my old Joomla 1.5 template, ja_purity and rhuk_milkyway still sitting in my templates folder.

In Joomla 2.5 you now delete templates in Extension Manager > Manager and select “Templates” from the “Select Type” dropdown list. You can then safely delete unwanted templates.

There is a problem however – When I went back to the template manager, for some reason they were still showing under Template Styles. As an aside template styles are not templates (yes, I know confusing). Go and look here if you want to know the difference –

When I tried to delete a template style I’d get the message “Cannot delete last style of a template”, also looking in the /templates directory I could still see the 3 unwanted Joomla templates.

I had a poke around in the Joomla DB and saw that the details for the template styles resides in the table “template_styles”. I deleted the unwanted styles from the table, deleted the templates from the /templates directory and everything was back to normal and I had no more unwanted Joomla template styles. Just to be safe I suggest you backup this table and your templates just in case something goes wrong.

Joomla also caches a copy of the Joomla template to display in Extensions > Template Manager:Templates. This is where you get a thumbnail of the template and some basic template details. To delete content go to Extension > Extension Manager > Discover. You should see your “discovered” templates sitting here from where it cached the /templates directory. Click the “Purge Cache” option and as long as you have deleted the relevant templates in the /templates directory these will now be deleted. Go back to Extensions > Template Manager:Templates and everything should be restored back displaying to just the templates you have kept.

Using a Google hosted library for MooTools in Joomla 1.5

No Comments »

A few of you out there may still be using or maintaining Joomla 1.5 sites, so this might be useful.

I’ve been on a bit of a performance splurge recently optimising some client sites  and I decided to look at how Joomla utilises the MooTools JS library. On further investigation quite a few of my sites don’t need mooTools  so I turned it off in those cases.

For those sites that do still need it decided to take advantage of Googles Hosted Libraries, as they still have the old MooTools 1.1.2 available (the version that is used in Joomla 1.5).

MooTools is loaded in Joomla from the JHTML class. The code that needs to be changed is in /libraries/joomla/html/html/behavior.php

The line you want to change is around line 50 and is-

 JHTML::script('mootools.js', 'media/system/js/', false);

Just comment this line out and replace it with:-

JHTML::script('mootools-yui-compressed.js', '', false);

Remember that this is a core hack, however as Joomla 1.5 is now end of life with 1.5.26 being the last release its pretty safe to say there won’t be any more updates!

Exact Audio Copy (EAC) FreeDB not working in Windows 8

No Comments »

I have used EAC for a few years now to rip my audio CDs. However having just upgraded to Windows 8 (not as bad as everyone thinks BTW) and it would not get any metadata for the album titles etc.

EAC uses FreeDB although the new version I installed also has GD3 as a metadata provider. I thought initially that this was the issue, and they were pushing people to a paid commercial service, but if you look in the metadata provider options  (EAC > Metadata plugin options) you will see that freedb is still there.

Apparently EAC needs NET 3.5 (although EAC starts up fine and gives no errors about NET 3.5 not being available – bad programming?). Logically I thought NET 3.5 would be supported via Windows 8 default NET 4.5 but that is not the case. See here for more info:-


Testing your SMTP server using telnet

No Comments »

Testing client web applications and websites often means migrating them temporarily to my development network for testing purposes. This means changing email server settings to ensure no emails escape from captivity, which would be embarrassing.

Occasionally I have issues with my internal email configuration and need to do a quick test to see if my internal email server is receiving emails from my website development servers. This can easily be achieved using the command line and telnet.

First off we need to esablish a connection to the email server, so telnet into your SMTP server from the command line like so:

telnet [ip-address] 25

Where ip address is your email server e.g “telnet 25″. The 25 signifies your SMTP port, 25 is the default.

We now need to check if the SMTP server is alive. So we can use:


What you get back depends on your SMTP server, OS etc. but you should get an OK message at least.

Now we want to send a test message to see if our SMTP server is receving email okay from our local network. To do this we need to tell it the email sender, email recipient and of course the message. The message  is in two parts – subject and body (although you dont have to fill in the subject as it is not mandatory). We do this using:-


To send the actual message we need to type the command:


Followed by a carriage return (enter).

To enter the subject we use:

Subject: Subject goes here

Then press enter TWO times.

You can now start typing the body of your email message. To finish the email body text input, enter a carriage return (enter) and then tpye a period (.) followed by carriage reutrn (enter) again.

Finally enter:


To exit the telnet program.

You should get an OK or message queued for delivery message back saying that the SMTP server has accepted the message. If not you have entered something wrong, or the email server doesnt like the message (for example an email relay config issue blocking you sending from your IP address).

Hope that is of help.

Securing your Google Apps with Google 2-step verification

No Comments »

Although it has been out for a while, I recently came across Googles 2-step verification security system. For those of you not in the know, you can find out more here:-

Google 2-step Verification Overview and Video

If you are security conscious or paranoid (or maybe even both) this is a good option to beef up your PC/device security for your Google apps, especially if you have a Android phone to act as the authenticator (the Google android apps is called Google Authenticator and can be downloaded from Google Marketplace on your android phone (its also available for iPhone too).

With this installed and configured you have to enter your password and the authentication code from displayed on your Android Phone to succesfully log-into a Google resource. So not only will a hacker have to know your password, but also your authentication code (which changes every few seconds).


Keepass – Auto-Type Stopped Working/Works intermittently?

1 Comment »

This drove me crazy. I use keepass for almost everything, and now and again it would stop working.

Finally figured out it only happened when I had VMware vSphere console open, obviosuly they conflict in some way.

Solution is to download the keepass plugin RDCAutoType from here –

This also has the bonus of working with Remote Desktop Connections (RDP).

Bitnami Images – Configuring Keyboard Mappings

No Comments »

I’ve started using Bitnami images for my test/dev system. They provide a quick way to get web apps up and running, however as they are optimised/minimal builds sometimes they need tweaking.

I’m based in the UK and the standard keyboard mapping is set for US. To reset for a different country/keyboard type use:-

sudo dpkg-reconfigure console-setup

Ubuntu – network card not recognised when system cloned.

No Comments »

I’m currently moving VMs around a lot between VirtualBox and ESXi and came across the following problem I hadn’t had for a while.

If you clone a Ubuntu VM and import it into ESXi you may get the following error:-

SIOCSIFADDR: no such device

The problem is that a new MAC address is created, and the old one still exists. What you need to do is get the MAC address of your card from the Virtual Infrastructure Client (right click the VM – select network adapter and you will see the MAC address).

Then and edit this file:-


What you need to do is delete the old NIC references (i.e. the ones that arent your MAC address).

Now save the file, and reboot the system (a cold reboot) and your NIC should now be recognised.

SVG Gradient Maker

No Comments »

If you have had problems with linear-gradient and rounded corners support in IE9, then you are probably aware there are several fixes available to make these two features work together, although should we really be having to do this in 2011? Come on Microsoft step up!

After looking at the options and reading an interesting thread here, my preferred fix is to use SVG to create a gradient and use background-image with a base64 encoded file. There is a nice little tool available that will do the hard work for you here:-

For those of you that don’t want to go to the bother rilling your own gradients, you can also use CSS3 PIE, which essentially does the same thing via a JS library.

Hope this helps!

Facebook Like Button – Module Positioning

No Comments »

I recently integrated the Facebook Like button into a client’s website (see here for more details on the like button) using XFBML to allow website visitors to also send a message along with their FB like. The message box however was cutoff inside my DIV due to overflow: hidden and also the message box was not ideally positioned.

I changed the CSS for the parent DIVs to overflow: visible and inserted the following CSS to overridew the standard facebook CSS selectors:

.fb_edge_widget_with_comment span.fb_edge_comment_widget {
    top: 120px !important;
    left: -215px !important;

Hope this helps some of you out that have been having a similar problem.