Php 调用未定义的方法stdClass::onDisplay()时出错

Php 调用未定义的方法stdClass::onDisplay()时出错,php,joomla2.5,stdclass,Php,Joomla2.5,Stdclass,我安装了joomla 2.5。我刚刚安装了CommunityBuilder组件。当我尝试添加字段时,收到错误消息: 致命错误:在第459行的/home/sharpfoc/public_html/joomla16/libraries/joomla/html/editor.php中调用未定义的方法stdClass::onDisplay() 如果有人对如何解决这个问题有任何线索,我们将不胜感激。谢谢 souleye编辑libraries/joomla/html文件夹中的文件“editor.php” 换

我安装了joomla 2.5。我刚刚安装了CommunityBuilder组件。当我尝试添加字段时,收到错误消息: 致命错误:在第459行的/home/sharpfoc/public_html/joomla16/libraries/joomla/html/editor.php中调用未定义的方法stdClass::onDisplay() 如果有人对如何解决这个问题有任何线索,我们将不胜感激。谢谢
souleye

编辑libraries/joomla/html文件夹中的文件“editor.php”

换了线

  $resultTest = $plugin->onDisplay($editor);
在第261行*的后面

// Try to authenticate — only add to array if authentication is successful


这对我有用。希望它也适用于您

除了错误消息已经告诉您的以外,我们现在应该告诉您什么?您有一个并尝试调用它没有的方法。因此,拿出调试器并逐步检查代码以了解发生了什么。为了进行限定猜测,我们至少需要查看第459行和一些周围的/调用代码。只修复症状,而不是根本原因,但我想这很有用,因此+1有问题的代码行是://尝试验证if($temp=$plugin->onDisplay($editor,$this->asset,$this->author)){$result[]=$temp;}看起来有些插件没有加载。将/libraries/joomla/html/editor.php的第268行从:
$resultset=$plugin->onDisplay($editor)至:
/$resultset=$plugin->onDisplay($editor);如果(方法_存在($plugin,'onDisplay')){$result[]=$plugin->onDisplay($editor);如果($resultset)$result[]=$resultset;}否则{$resultset=false;回显'Bad plugin:'。$plugin->name.';}
这将消除错误,并显示未正确安装的插件,以便重新安装(在我的例子中是“Modules Anywhere”)。此问题肯定与某些编辑器插件缺少“onDisplay”方法有关。因此,您应该检查所有
编辑器xtd
类型插件。插件中出现此类问题的原因可能是插件已过时,因此更新插件可以解决此问题。
 if (method_exists($plugin, 'onDisplay')) {
     $result[] = $plugin->onDisplay($editor);
 }