1

I am using a custom template, and when I enable a certain module, I get the following error:

Catchable fatal error: Object of class stdClass could not be converted to string in 
/home/my_host_username/public_html/libraries/cms/module/helper.php on line 202

Any ideas on how to fix this?

2

This is one funny problem.
It seems that Joomla includes code from module template overrides in a manner that certain variable names do affect the core JModuleHelper renderModule function.

All you need to do to reproduce this bug-like behavior, is to write the following line in your module template override:

$template = JFactory::getApplication()->getTemplate(true);

By loading any object in a variable called $template, you break your site.

So, the problem has a simple solution. Namely:
Search the module template override code (inside templates/your_template/html/mod_modulename)
or possibly even in the module itself (inside modules/mod_modulename), for $template and replace with anything else, like $a_template or $my_template and this will be fixed.

Make sure to let the developer know, if this is not something written by you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.