How to Debug Joomla?

At itoctopus, we like to share our knowledge with our readers. We’re one of the very few Joomla Consulting companies who are not afraid to do so for fear of educating competition or losing potential revenue. We would like, in this post, to share the secrets of debugging Joomla, the way we do it! Yes, we don’t have anything called the secrets of the trade. We only have our hard work and experience!

Two things to note before we start:

  1. Joomla’s official website has a guide on debugging Joomla – but it’s advanced, way too advanced for the layman, and there are much better ways for debugging Joomla. We’re sure that whoever wrote this guide doesn’t use it himself.
  2. The guide below is for debugging Joomla – debugging means knowing the source/reason behind the error in order to fix the error – it doesn’t mean fixing the error.

After this brief introduction to this post, let us start our digestible, easy-to-use, hassle-free guide to debugging Joomla:

  • An error suddenly appears on your Joomla site – or you see the same error on every page of your Joomla website. (If you see a blank page then make sure you enable error reporting – see here for a full guide on error reporting in Joomla.)
  • Read the error – if the error is detailed – e.g. stating which file has the problem and what is the problem, then you’re good to go. You know what the problem is and where the problem is! All you need to do right now is to go ahead and fix it (or call some Joomla Experts to do this for you).

  • If the error is not detailed (such as “invalid token“) or you see something like “Internal Server Error”, then you must change tactics, and you will need to follow the below steps to locate the error.

  • The first thing that you need to do is to disable caching. Caching is the source of most evils in Joomla (the source of almost equivalent evils is SEF). Disable caching completely by disabling the System – Cache plugin in your Plugin Manager and by disabling caching in your Joomla’s main configuration page. If the problem is solved by disabling caching, then it might be that some other plugin/module is conflicting with your cache. Read on!

  • If after you disable caching you still see the problem, then disable SEF. SEF is known to be a painful experience for most Joomla administrators. If disabling SEF fixed the problem, then most likely (and similarly to cache), the problem is that SEF is conflicting with one of your extensions (usually a plugin or a module).

  • If, even after you disable SEF, you still see the same error, then you will need to do the following:

    • Go to your Plugin Manager.
    • Disable each and every active plugin on your Joomla website (one by one).

    • Each time you disable a plugin, check your website to see if the error is no longer there.

    • The moment you see that the error disappears, you will need to re-enable the plugin and… (warning: you will need to be a programmer to continue the below steps):

      1. Open the plugin PHP file – for example, if the plugin is Content Password, then its corresponding PHP file should be contentpassword.php under plugins/content/.
      2. Add the code die('test');) at the beginning of the file.

      3. Check your website to see if test is simply displayed on the page.

      4. If it is, then, move the line die('test);) to the second line in the file.

      5. Repeat steps 3-4 until the original problem re-appears. The line immediately preceding the die('test') after the problem re-appeared is the problematic line and it needs to be fixed.

  • If the error is still there even after disabling all the plugins, then you need to do the same thing that you did for plugins for modules (e.g. disable modules one by one and check if the error goes away).

  • If neither disabling the plugins nor disabling the modules worked for you, then try to change the template (go back to the default template made by Joomla) and see if that solves the problem. If it does, then most likely there’s something wrong with your template.

  • If you still see an error, then the reason behind the error is probably one of the following:

    1. A corrupt .htaccess file: This problem is usually solved by renaming the .htaccess to something like htaccess.old – or by completely deleting the .htaccess file.
    2. An unsuccessful modification in Joomla’s core. You will need either to reinstall Joomla or to request the help of some Joomla professionals who will certainly be able to locate the problem for you.

If you’re seeing a problem on your Joomla website and are unable to know where it’s coming from and how to fix it, then we’re here to help! Just contact us and we’ll try our best to fix your problem in no time! Our fees are very reasonable, we are friendly, and we know much more than a few things about Joomla!

3 Responses to “How to Debug Joomla?”
  1. Pingback by 20 Benefits of Using Joomla | itoctopus — July 31, 2012 @ 11:10 am

    […] with other extensions. In fact, the first action that we ask our clients to do if they elect to debug their own Joomla website is to disable caching. Nevertheless, caching is must-use feature in Joomla that dramatically […]

  2. Pingback by Component Not Found on Joomla Login | itoctopus — August 17, 2012 @ 10:50 am

    […] used our Joomla debug strategy and we started disabling plugins, one by one, until the problem was no longer there. The culprit […]

  3. Pingback by “Class Datetime Not Found” Error in Joomla | itoctopus — October 7, 2013 @ 7:06 am

    […] we started to debugging Joomla, and, after a while, we were successful in forcing Joomla to spit the actual error. It was this […]

Leave a comment