Solved: Fatal error: Call to undefined method stdClass::onDisplay()

When, for example, trying to add a new article, one may get the following error:

Fatal error: Call to undefined method stdClass::onDisplay()

A simple hack can help you get rid of this error. 

1. Open \libraries\joomla\html\editor.php
2. Look for this line (line 295 on Joomla 1.7 & 2.5):
   if($temp= $plugin->onDisplay($editor, $this->asset, $this->author)) 
3. Replace that line with 
  if(method_exists($plugin,'onDisplay') && $temp= $plugin->onDisplay($editor, $this->asset, $this->author)) 

Be sure to make a backup of the editor.php before overwriting in case something goes wrong. 

This helped me to get rid of Fatal error: Call to undefined method stdClass::onDisplay() on one of my sites. 

Hope this helps!

ADs top-right (2)

About me

Iinstructor of robotics (LEGO Mindstorms), computer teacher, IT support, web dev, currently studying cyber-physical systems engineering.

If you found a solution here, would you consider donating $25,000 for my next project?

Just kidding, 1$ would do fine.

Hope you found what you needed. Thanks for stepping by.