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

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
DBoon
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jul 07, 2009 6:53 pm

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

Post by DBoon » Tue Jul 07, 2009 7:00 pm

Thanks for the information. I just wanted to let everyone know that I solved this issue by following what caiorg said.

I had a plug in from a previous install of joomla. When I reloaded it to another server the pertinent rows for the plug-in were still the table in MYSQL. The component uninstalled, although it gave errors. However the plug was not able to be uninstalled.

I fixed by going to MYSql and browsing the Plugin table and simply deleting the rows manually.

Thats all it took.

Thanks. for the advice.

Yusuf Anyanzwa
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jul 15, 2009 8:03 am

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

Post by Yusuf Anyanzwa » Wed Jul 15, 2009 8:22 am

Go to root directory, libraries\joomla\html\editor.php

In line 261 replace

Code:
// Try to authenticate
$result[] = $plugin->onDisplay($editor);


with


Code:
// Try to authenticate
if (method_exists($plugin, 'onDisplay')) {
$result[] = $plugin->onDisplay($editor);
}


This code works

peterj
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Apr 03, 2009 11:47 am

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

Post by peterj » Thu Jul 30, 2009 10:14 pm

Worked instantly thanks!

dessery
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Nov 28, 2008 3:46 pm

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

Post by dessery » Mon Aug 17, 2009 11:23 am

Hi All

I just ran into this problem today and found this thread. Thanks to caiorg's excellent post i was able to solve the issue very easily. My problem started aften i uninstalled the content templater component/plugin.

The problem was exactly as caiorg said. There was still a row in the jos_plugins table in the database for the plugin that adds a button to the editor. Just deleted that row and it started working again instantly.

Hope this may help someone with the same problem.

laurieg
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri Feb 27, 2009 9:49 pm

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

Post by laurieg » Thu Aug 20, 2009 1:17 pm

Here is my error line:

Fatal error: Call to undefined method stdClass::onDisplay() in /home/publicr/public_html/4injury.com/libraries/joomla/html/editor.php on line 261



I am completely illiterate when it comes to html.
I am afraid I am going to make a mistake.


Here is live 261:


$result[] = $plugin->onDisplay($editor);

laurieg
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri Feb 27, 2009 9:49 pm

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

Post by laurieg » Thu Aug 20, 2009 1:33 pm

I did this and unfortunately go another error. line 300 something, so I quickly replaced the old html. This is my fear. I am afraid of making a huge mistake.


Yusuf Anyanzwa wrote:Go to root directory, libraries\joomla\html\editor.php

In line 261 replace

Code:
// Try to authenticate
$result[] = $plugin->onDisplay($editor);


with


Code:
// Try to authenticate
if (method_exists($plugin, 'onDisplay')) {
$result[] = $plugin->onDisplay($editor);
}


This code works

jbanes78
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu May 17, 2007 5:20 am

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

Post by jbanes78 » Sat Aug 22, 2009 7:08 am

dessery wrote:Hi All

I just ran into this problem today and found this thread. Thanks to caiorg's excellent post i was able to solve the issue very easily. My problem started aften i uninstalled the content templater component/plugin.

The problem was exactly as caiorg said. There was still a row in the jos_plugins table in the database for the plugin that adds a button to the editor. Just deleted that row and it started working again instantly.

Hope this may help someone with the same problem.

This absolutely did the trick for me.

Thank You so much for your post. I also tried out Content Templater, and once uninstalled.... error.
Your post saved me!!!

Jim

User avatar
DennisKmetz
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon May 05, 2008 12:03 am

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

Post by DennisKmetz » Sat Aug 29, 2009 5:03 pm

Thanks Ed,

This worked quiate well:

// Try to authenticate
if (method_exists($plugin, 'onDisplay')) {
$result[] = $plugin->onDisplay($editor);
}

Dennis

visability
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Aug 03, 2006 10:47 am
Location: South Africa
Contact:

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

Post by visability » Wed Sep 02, 2009 12:11 pm

Thank you ed209!

I have been having a tough time getting a wysiwyg editor to work on the front end of my it_veranda template based website. Your fix has fixed the problem.
Pools and Swimming Pool builders - http://www.poolbuilders.co.za
Pools in Cape Town - http://www.poolbuilders.co.za/pool-buil ... -town.html

charleyhankins
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Fri Oct 12, 2007 7:07 pm

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

Post by charleyhankins » Sat Sep 05, 2009 8:03 pm

ed209 wrote: To retain full functionality, simply encapsulate the line with a check for the ‘onDisplay’ method as shown below.

// This was the original code that did not check for the method
// $result[] = $plugin->onDisplay($editor);

// Try to authenticate
if (method_exists($plugin, 'onDisplay')) {
$result[] = $plugin->onDisplay($editor);
}

I hope this helps everyone.

Best regards,
Ed.
That worked for me!!
Thanks Awfully!!
CH

arihant2301
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Aug 04, 2009 12:12 pm

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

Post by arihant2301 » Tue Oct 13, 2009 2:03 am

munchdes wrote:Ok,

There are lot's of threads on this issue and I have read through most of them. This seems to be the last updated so I'll add my findings here.

It was a comment in another thread that got me onto this line of thinking but the solution provided was a little more technical than the one I used.

The button plugins are referenced in the sites database, so if you have some plugins installed locally as you build your site then you move it to the server with a nice fresh install and import your database from your local environment you have a conflict. The database sees the "button" plugin reference and tries to load them when you try to add or edit an article. The Plugins aren't installed so they can't be displayed: Fatal error: Call to undefined method stdClass::onDisplay()

So it is a user error, in my case anyway, even though a little convoluted and hard to track down. Using a hack to get around it or disabling plugins isn't a great solution, what if you actually want to use the plugins?

I solved my issue by uninstalling the plugins that weren't actually installed, this showed me errors as you can't uninstall something that isn't installed, but it worked.

Luke
You are right thanks! I had actually uninstalled Content Templater. After installing it again it works like charm!!!
:) Thanks!

Kosiiii
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Thu Feb 19, 2009 1:40 pm

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

Post by Kosiiii » Thu Oct 15, 2009 1:27 pm

ed209 wrote:Hi All,

I have seen over 20 reported errors relating to this incident and most seem to indicate removing plug-ins and/or removing the offending line of code.

If you remove the offending line 261 in the 1.5.7 release of Joomla, the editor will work but you will lose access to button plug-ins such as ‘Image’ and ‘Page Break’.

To retain full functionality, simply encapsulate the line with a check for the ‘onDisplay’ method as shown below.

// This was the original code that did not check for the method
// $result[] = $plugin->onDisplay($editor);

// Try to authenticate
if (method_exists($plugin, 'onDisplay')) {
$result[] = $plugin->onDisplay($editor);
}

I hope this helps everyone.

Best regards,
Ed.
Looks like it worked for me too ... BUT I had to add one more } here : $result[] = $plugin->onDisplay($editor);
}

:geek:

joemistymoore
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Nov 02, 2009 1:27 pm

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

Post by joemistymoore » Mon Nov 02, 2009 4:31 pm

I can't find how to fix this like all of you....can anyone help?

Fatal error: Call to undefined method stdClass::onDisplay() in /home/jmoore/public_html/clsgrouponline-com/libraries/joomla/html/editor.php on line 261

This is the code I'm getting....

mahalo,

Joe

tescojim
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Oct 11, 2007 10:03 am
Contact:

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

Post by tescojim » Thu Nov 19, 2009 2:10 am

I've got a similar problem after upgrade to 1.5.15.

After when I made the ed209's fix I've got another error message:

Code: Select all

Parse error: syntax error, unexpected $end, expecting T_FUNCTION in /home/content/p/o/w/powered/html/whitelabel/libraries/joomla/html/editor.php on line 321
Please help. :(
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65

burket
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Sat May 30, 2009 12:16 pm

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

Post by burket » Thu Nov 19, 2009 11:58 am

hi

i am getting the same problem

Fatal error: Call to undefined method stdClass::onDisplay() in /var/www/zain.madressa.net/2009/libraries/joomla/html/editor.php on line 261

i cant change anything on editior.php as the file is read only. the chmod option is disabled - how do i enable it. any ideas how this error came about

arcan
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Wed Feb 15, 2006 3:22 pm

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

Post by arcan » Mon Nov 23, 2009 2:48 pm

After upgrading from 1.5.9 to 1.5.15 I can not open any editor and have this Fatal error.
I have already read this topic but the new code of the file editor.php does not solve the problem.

I hope in the help of experts. Otherwise I will have to restore the previous version.

xhenifiordi
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Nov 30, 2009 12:05 pm

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

Post by xhenifiordi » Mon Nov 30, 2009 12:28 pm

Hello to all. Even un have a problem that is gloomily. When due to open an article with error cases and makes the step, but when I go to the "Edit Article" with out this problem

Fatal error: Call to undefined method stdClass:: onDisplay () in / home / arninfo / public_html / durresilive.net / radio / libraries / joomla / html / editor.php on line 261

Image

Can not find a solution. Oh and I had a question if in the same server I create a new folder and shove it Dukla joomla 1.5 installed from scratch, while joomla with errorin continues to keep this as is and un to work with this folder by reconstructed site. Now I want to say that are within 2 joomla 1 server will un mnud that after the lapse of jomlas that added functionality and hide this jomla with error will be out this new jomla us that was created with a new folder will appear on first page or not?

My site is http://www.durresilive.net

sergiuga
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed May 14, 2008 2:35 pm

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

Post by sergiuga » Wed Dec 02, 2009 6:50 am

I have experienced the same problems due to wiki plugin from Azrul. Uninstalling the two plugins (button and content plugins) solved the problem.

xhenifiordi
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Nov 30, 2009 12:05 pm

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

Post by xhenifiordi » Wed Dec 02, 2009 10:46 am

sergiuga thanks for suggestion but could you tell me the path of these plugins, or more accurately how these plugins are called

sergiuga
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed May 14, 2008 2:35 pm

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

Post by sergiuga » Wed Dec 02, 2009 11:10 am

xhenifiordi wrote:sergiuga thanks for suggestion but could you tell me the path of these plugins, or more accurately how these plugins are called
The component is called JomWiki (http://www.azrul.com/products/joomla-wiki.html) and comes with two plugins, Editor Button - WikiLink and Content - Wiki. After uninstaling the component, the two plugins remained enabled and that caused the fatal error in my case. I think someone else has mentioned a similar issue with another component, that after being removed, caused the same error.

Hope it helps.

xhenifiordi
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Nov 30, 2009 12:05 pm

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

Post by xhenifiordi » Thu Dec 03, 2009 4:57 pm

sergiuga wrote:
xhenifiordi wrote:sergiuga thanks for suggestion but could you tell me the path of these plugins, or more accurately how these plugins are called
The component is called JomWiki (http://www.azrul.com/products/joomla-wiki.html) and comes with two plugins, Editor Button - WikiLink and Content - Wiki. After uninstaling the component, the two plugins remained enabled and that caused the fatal error in my case. I think someone else has mentioned a similar issue with another component, that after being removed, caused the same error.

Hope it helps.
sergiuga honor to know a lot for this solution to me and was really very easy thanks.

xhenifiordi
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Nov 30, 2009 12:05 pm

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

Post by xhenifiordi » Thu Dec 03, 2009 6:01 pm

Hey ok this problem was resolved, and now un can post new article but the worst is that to be activated this function I got from this plugins "Editor Button - read more" but now can not post to an article in "red more "and it totally distorts the page when items containing un shove long. please tell me how to act

xhenifiordi
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Nov 30, 2009 12:05 pm

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

Post by xhenifiordi » Thu Dec 03, 2009 6:28 pm

With looks that solution and have you asked above, was a wrong letter, was written wrong. Un changed only one letter was "more reas" I made "read more" and now everything continues to function normally. You are very flm that the answer will contact you again if you do not understand anything. joomla No. 1 with good

xhenifiordi
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Nov 30, 2009 12:05 pm

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

Post by xhenifiordi » Fri Dec 04, 2009 4:12 pm

who knows any plugins that can isntaloj, to enable visitors to comment on that article placed in joomla 1.5?

GrahamM
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Mar 16, 2009 10:19 am
Location: Melbourne, Australia

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

Post by GrahamM » Wed Dec 09, 2009 10:23 am

ed209 wrote: ................
To retain full functionality, simply encapsulate the line with a check for the ‘onDisplay’ method as shown below.

// This was the original code that did not check for the method
// $result[] = $plugin->onDisplay($editor);

// Try to authenticate
if (method_exists($plugin, 'onDisplay')) {
$result[] = $plugin->onDisplay($editor);
}
I am running Joomla 1.5.15 and for my editor.php page the code at line 268 shows a very slightly altered code with the word Test included, e.g. $resultTest rather than $result as Ed provided above.
Taking this into account I modified the code as suggested (see below) and it works great with no more Fatal Error messages and the editor is working fine again!

My modification of Ed's original suggestion

// Try to authenticate -- only add to array if authentication is successful
if (method_exists($plugin, 'onDisplay')) {
$resultTest = $plugin->onDisplay($editor);
}
if ($resultTest) $result[] = $resultTest;

Thanks Ed, great help!! :)

abelito
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Nov 16, 2009 9:39 pm

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

Post by abelito » Thu Dec 10, 2009 6:37 pm

If you are building your own plugin and have this error it may be because:

Your plugin class must be named "plgButton"+yourpluginname.

like this:

Code: Select all

class plgButtonsqueezeboximg extends JPlugin
{
	
	function plgButtonsqueezeboximg(& $subject, $config)
	{
		parent::__construct($subject, $config);
	}

	function onDisplay($name)
	{

xtrememediaworx
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Tue Aug 12, 2008 5:38 am

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

Post by xtrememediaworx » Sat Dec 12, 2009 12:15 am

I have tried these steps myself but none of them have helped me out so far.

What actually is this error?

xhenifiordi
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Nov 30, 2009 12:05 pm

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

Post by xhenifiordi » Sat Dec 12, 2009 11:50 am

xtrememediaworx wrote:I have tried these steps myself but none of them have helped me out so far.

What actually is this error?
hey wa solution xtrememediaworx this error very simply, with odd par buttons to be disabled and enabled them, and now pluginsit name "read more" was written "more reas and only for that" reas "allow me sme Post articles , To advise and to kontrrollosh you here probably have a wrong names to plugins. Not to say that there are 100% there but for sure check out;).

GrahamM
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Mar 16, 2009 10:19 am
Location: Melbourne, Australia

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

Post by GrahamM » Sat Dec 12, 2009 9:29 pm

xtrememediaworx wrote:I have tried these steps myself but none of them have helped me out so far.

What actually is this error?
This often seems to occur when a site has been moved to a different location (eg from a testing server to a live server) and a plugin has not correctly installed on the new server, often a missing button plugin is preventing the editor page from loading.

Here is the way I solved it on my site:-

1. Open editor.php on the site giving the error and amend the code as per my previous post above.

2. Save file to server, this should allow the editor to open but the offending button will not appear correctly.

3. Open two browser windows, one with the editor on your original site and the other browser window with the editor on the newer (problem) site, then compare the buttons on the two editors. You should find one button on the newer site that is missing or has a different label. This is the button plugin that is causing the problem.

4. Uninstall and re-install the offending button plugin and everything should be back to normal and working correctly.

Hope that helps. :)

mows
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Dec 16, 2009 12:41 am

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

Post by mows » Wed Dec 16, 2009 2:33 am

How do i fix this error!
"Fatal error: Call to undefined method stdClass::onDisplay() in /home/yardch/public_html/libraries/joomla/html/editor.php on line 261"


I don't see any doclink plugins

Please let me know what to do.

Thank you


Locked

Return to “Administration 1.5”