The Joomla! Community Magazine™

Is it me, or is this a bug?

Written by | Tuesday, 01 March 2011 00:00 | Published in 2011 March
Not everyone is, or wants to be a programmer. However, you don’t have to be to help find and track down bugs in software. Using a few techniques, you can often get to the bottom of a problem and determine if it is a bug, user error, or something else. Since software development is an ongoing process, you may find yourself wondering when you come across a problem if it is a bug, or not.

What are ‘bugs’

A bug is an error in a program that causes unexpected behavior or program failure. There are many ways bugs can appear, and a lot of ways that software can appear to have bugs even if it doesn’t. For example, as someone starts to use Joomla! 1.6 with experience from using Joomla! 1.5, he or she will notice the many changes in the administrator. This person may think there is a bug with the new way something works, when it actually works as intended, just not as expected.

True bugs are the ones where you see error messages, or where something clearly fails to function as it should. Some people argue that bugs can be anything from programming errors to usability problems. In this we will focus mostly on the programming bugs.

First steps when a problem occurs

If you come across an issue, it is helpful to turn Error Reporting to Maximum in the Joomla! Configuration, but do not do this on a live site as it can display sensitive information. Testing should be done in a private site that isn’t open for the world to see. If that displays various error messages, then you can help determine if it is a software bug, or possible user error.

When I troubleshoot, I have to also try various things listed below, depending on the situation.

  • Make sure you have the latest version of Joomla! installed
  • If the issue is on the front end, try disabling all non-core plugins or modules on a given page one by one to see if there is a conflict
  • If you just changed something, attempt to undo your changes and see if the message goes away
  • If you are using a custom template, you can see if a default template renders properly
  • If the problem happens in multiple places, try to see what the places have in common (a plugin, component, etc)

The general process is to try and eliminate areas that could be causing the problem. This also means you need to have a good understanding of what you have setup. If you get error messages, then you should learn a little about how to read them. If you don’t get any error messages, you’ll want to go to the next section.

Understanding error messages

PHP and Joomla! both provide error messages, and they come in several flavors.

  • Notice - This is a low level message that doesn’t seem to be a big concern and doesn’t stop the program, but is worth letting you know.
  • Warning - This is the middle level, where Joomla! is still able to run, but something is wrong that should be fixed.
  • Fatal - This is the top level message where Joomla! cannot continue to run until it is fixed.

When Joomla! can, it tries to catch errors and prevent them from breaking the site, so you will also get messages from Joomla!. This is why turning Error Reporting to Maximum is important, as it can show more messages than you might see otherwise.

To better understand the error messages, try to do a search for them in Google (for PHP errors, you should remove the full path to the file). Much of the time, explanations are easy to find to explain what these errors mean. This doesn’t mean you’ll find information on exactly how to fix it, but the more information you have, the better. So if you get an error about JFolder being unable to copy files, you have a good starting place to look for solutions.

Error messages can be scary at first, but they give you a lot of information that you can use. First, it tells you where the problem occurred, even if you aren’t a programmer you can figure out some basic information that will be helpful, especially when trying to talk with others about your problem.

Confirming a bug

If you’ve received error messages, or if you are sure the functionality isn’t working correctly, there are a few things you need to do to try and confirm this is a legitimate bug.

The first thing to do is to take a moment to retrace your steps and look at what is going on. Remember what you were doing to get to this point, and write down the steps. See if you can go back and reproduce the problem following the same steps. If you can repeat the process and get the same results, its much easier for other people to test the problem to help confirm.

Consulting others about the bug

One of the greatest tools in battling bugs, is the community. If you aren’t a programmer or can’t look into the code to determine a bug, you need the help of others. If you think the issue is with Joomla! itself, you can search the forum, post in it, use the mailing lists, and finally use the Joomla! tracker system. I would suggest that you follow these guidelines to know where to consult others about your problem.

If you are very unsure what your problem is, and unsure how to reproduce it, the forum is probably the best place. If you are more confident that you have a real issue, then I might suggest the mailing lists (select the one most appropriate to your situation). Lastly, if you are very confident that you have found a bug, you should submit it to the bug tracker.

If you think your issue has something to do with an extension, you will need to use the support system for that particular extension. They normally provide some method of support where you can report your bug, but be careful not to abuse their support systems by submitting false bugs or not following their guidelines.

Bugs happen. Be patient, respectful, and informative

As a programmer who deals with support issues, sometimes I get false bug reports or bug reports that are very rude. It doesn’t seem to matter if its a free or paid program; some people are rude and demanding. Maintaining a program is a stressful job, and you have to remember that there are regular people who take the time to read your reports and attempt to help you. Some of these people are volunteers and others may be doing this for their job, but they are people who help and being respectful will increase the chances of people taking you seriously.

When consulting others, information is your key to success. Too often people post a simple statement like 'XYZ isn't working when I click on this.' Chances of you getting anyone to respond to you are lower, and if they do they will just ask you to explain yourself better. To help everyone along, start off by explaining exactly what you did and how others should be able to duplicate the same problem. There is also the other extreme where people write far more than necessary. Be as clear as possible, but also as short as possible.

Lastly, for every time you reach out to ask for help, I also think its good practice to attempt to try and help someone else. There is always someone who can use your help, if you are willing to take a few moments to look around.

Read 22926 times
Tagged under Developers
Jeremy Wilken

Jeremy Wilken

The face behind Gnome on the run, and Lead Developer at Joomla Shack, Jeremy has been involved with Joomla for many years. He blogs regularly at his website about the community and with topics that are related to Joomla admins and developers.

Jeremy is located in League City, Texas, USA. He does not have an accent, sorry, he is actually native to the Chicago area.

Latest from Jeremy Wilken

Language Switcher