|
Fatal Errors in Joomla Extensions |
|
Written by Cheryl Allin
|
|
Thursday, 13 December 2007 |
|
Nothing can be more frustrating than installing a hot new component or module, going to your Joomla website, hitting refresh only to be presented with some blasted error such as "Fatal Error: Call to a member function get() on a non-object in blah blah on line blah blah." It makes you want to scream and pull your hair out!
This has happened to me countless times and unfortunately, when you're using an Open Source system like Joomla and open source extensions (and sometimes PAID ones,) it's going to happen to you at some point.
Here's just a basic rundown of what you can do if you get a kooky error:
- Google to the rescue! Often, the first thing I do is copy the bulk of the error and search for it in Google. If you're lucky, you'll turn up a forum post where someone has already dealt with and resolved this issue. If you're an early adopter of extensions and are one of the first to try one out, this may not help you out. You might just find other Joomla sites that have the same problem, they just haven't fixed it and are showing their underwear to Google spiders. Eeek!
- Backup, Backup, Backup! If you're still having an issue, backup your files then try uninstalling and reinstalling. This may be the fix - also be certain you have the most recent version. If there's a mambot involved - check to be sure it's published! You'd be surprised how easy it is to forget this one!
- Go to the Source! If you've purchased this error wrought extension, go back to that company and see if they have a support forum or knowledge base. If you're dealing with a real pro, you may find they offer a trouble ticket site where you can get support direct from the developer. Be sure, however to search really deep on the site for an answer prior to making a post or submitting a ticket - if your issue has already been covered ad nauseum - they won't be thrilled that you're posting it all over again. (They may flame you and call you lazy - eek!)
- Dive into the Forums! When the first two steps above get you nowhere, you can often find support at Joomla's Forums. There are many, many highly skilled Joomla Whizzes who frequent the forums - just be sure to check if there is already and answer somewhere on the forums. I will often use the forum search function and type in a bit of the error code. Search deep before posting - again, don't get flamed!
- Peer into the Scary Code! As a last ditch effort to attempt to get your problem solved, you can take a look at the file and line number to see if there's anything that "jumps" out at you that you might be able to fix. This is only if you really, really want the thing to work and don't want to wait for a bug fix or update. An example (one that inspired me to write this post) is today I downloaded the recent version of Jom Comment's 'Latest Comments' mod and I got this lovely error: "Fatal error: Call to a member function get() on a non-object in /my/folder/structure/modules/mod_jomlatest.php on line 53" I personally went through steps one through three and found no answer. I didn't submit a ticket, despite AzrulStudio's having a Wonderful support system as it's now past one o'clock in the morning. I decided to take a look at line "53" and see what was there. It happened to be some PHP to grab the censored words from Jom Comment. I don't use censored words, so I said "WTF" and stripped that out of mod_jomlatest.php. I am NOT a php coder, so this is risky - but I could always uninstall it, right? So, I reuploaded via FTP and refreshed my site - got a new error with a new line to check - deduced that I now had to remove "$comment = $jomLatestMod->censorText($comment);" from the code since it was "looking" for the other part I had deleted. Saved, uploaded, refresh and voila! The Mod now works! This is just a short term, I'm terribly impatient hack until I get an official answer. It could be that some other thingie is interfering. Of course, if you DO know php - you would easily be able to know what that error means - but then, you probably wouldn't be here! You'd be off designing your own cool extensions for Joomla! LOL
I hope this helps everyone bend Joomla to their will! I ended up at #5 with my situation and then just went back to #2 and that fixed it! Yippee! So, if you keep at it, you'll find a solution. Let me know what you think - and if you have any advice to share, please leave a comment!!
|