Mon 07 Dec |
|
I have had a couple of occasions when uncooperative, client chosen hosts have overridden the Joomla error reporting setting. In this case unimportant "Notice" errors can be disabled from within the code. The first step is to open the file in a text editor, that is reported in the error message, in this case plugins/content/ultimate_social_bookmarking_plugin.php on line 77. The error here is a "Notice:", the lowest level of error that php returns, i.e. an error that won't break the code but is there. It is for you to judge whether it worth trying to fix the php error or just stop it being reported. If it was a code breaking error then of course it would need to be fixed. Also if the error reporting was switched off completely on the server (as it should be for a production site) then the error wouldn't be displayed anyway. In this case due to an uncooperative host who wouldn't disable the error reporting and was overriding the Joomla setting disabling the individual error reporting within the code was the easiest option. So the line 77 giving the error "Notice: Undefined property: stdClass::$catid" was - if ($article->catid == trim($ex))just means that $catid hasn't been defined in the code and doesn't effect the operation of the module. Therefore we can change the code to - if (@$article->catid == trim($ex))Notice the @(at) symbol before the variable? This tells the php engine not to report any propblems with this variable. Now the module displays correctly. |
Last Updated on Monday, 07 December 2009 11:40 |