Page 2 of 4

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

Posted: Tue Jul 07, 2009 7:00 pm
by DBoon
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.

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

Posted: Wed Jul 15, 2009 8:22 am
by Yusuf Anyanzwa
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

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

Posted: Thu Jul 30, 2009 10:14 pm
by peterj
Worked instantly thanks!

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

Posted: Mon Aug 17, 2009 11:23 am
by dessery
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.

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

Posted: Thu Aug 20, 2009 1:17 pm
by laurieg
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);

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

Posted: Thu Aug 20, 2009 1:33 pm
by laurieg
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

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

Posted: Sat Aug 22, 2009 7:08 am
by jbanes78
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

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

Posted: Sat Aug 29, 2009 5:03 pm
by DennisKmetz
Thanks Ed,

This worked quiate well:

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

Dennis

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

Posted: Wed Sep 02, 2009 12:11 pm
by visability
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.

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

Posted: Sat Sep 05, 2009 8:03 pm
by charleyhankins
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

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

Posted: Tue Oct 13, 2009 2:03 am
by arihant2301
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!

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

Posted: Thu Oct 15, 2009 1:27 pm
by Kosiiii
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:

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

Posted: Mon Nov 02, 2009 4:31 pm
by joemistymoore
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

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

Posted: Thu Nov 19, 2009 2:10 am
by tescojim
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. :(

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

Posted: Thu Nov 19, 2009 11:58 am
by burket
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

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

Posted: Mon Nov 23, 2009 2:48 pm
by arcan
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.

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

Posted: Mon Nov 30, 2009 12:28 pm
by xhenifiordi
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

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

Posted: Wed Dec 02, 2009 6:50 am
by sergiuga
I have experienced the same problems due to wiki plugin from Azrul. Uninstalling the two plugins (button and content plugins) solved the problem.

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

Posted: Wed Dec 02, 2009 10:46 am
by xhenifiordi
sergiuga thanks for suggestion but could you tell me the path of these plugins, or more accurately how these plugins are called

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

Posted: Wed Dec 02, 2009 11:10 am
by sergiuga
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.

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

Posted: Thu Dec 03, 2009 4:57 pm
by xhenifiordi
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.

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

Posted: Thu Dec 03, 2009 6:01 pm
by xhenifiordi
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

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

Posted: Thu Dec 03, 2009 6:28 pm
by xhenifiordi
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

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

Posted: Fri Dec 04, 2009 4:12 pm
by xhenifiordi
who knows any plugins that can isntaloj, to enable visitors to comment on that article placed in joomla 1.5?

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

Posted: Wed Dec 09, 2009 10:23 am
by GrahamM
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!! :)

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

Posted: Thu Dec 10, 2009 6:37 pm
by abelito
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)
	{

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

Posted: Sat Dec 12, 2009 12:15 am
by xtrememediaworx
I have tried these steps myself but none of them have helped me out so far.

What actually is this error?

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

Posted: Sat Dec 12, 2009 11:50 am
by xhenifiordi
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;).

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

Posted: Sat Dec 12, 2009 9:29 pm
by GrahamM
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. :)

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

Posted: Wed Dec 16, 2009 2:33 am
by mows
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