Optimize your Joomla! 1.5 component installer

Most developers know that a component can have an install.componentname.php, containing a com_install() function with your custom instructions. For example, copying files to different locations or inserting localized sample data. When these instructions fail, you can of course print a message about that. The result however, is that the user sees both your ‘Failed’ message, as well as Joomla!’s ‘Success’ message. Users find this is very confusing.

The solution is actually extemely simple: inside com_install(), you need to return false. This tells the installer that your custom script has failed, and a relevant error message will be displayed. There is an added benefit as well: the installer will perform a rollback, removing all the files in the process.

By the way: I’m blogging live from the Joomlatools Bug Squashing event in Brussels!

Up next

A closer look at the new features in LOGman 4.0

A closer look at the new features in LOGman 4.0, focussing on the SEO benefits for your website.

Read more →

How to improve your website SEO with LOGman Linker.

Learn how the LOGman Linker plugin helps increase your website's Page Authority for search engine ranking.

Read more →

LOGman 4.0 brings website analytics to your fingertips

LOGman 4.0 is available to download now, with a brand new analytics feature.

Read more →