【问题标题】:how to convert a joomla 2.5 plugin to 3如何将 joomla 2.5 插件转换为 3
【发布时间】:2015-04-21 19:11:53
【问题描述】:

我有一个 joomla 2.5 的插件 我想在 joomla 3 中安装它,但安装后我看到这个错误:

致命错误:在第 21 行的 /home/xxx/public_html/administrator/components/xxx/xxx.php 中调用未定义的方法 JController::getInstance()

错误行:

// Require specific controller if requested
if($controller = JRequest::getCmd('controller'))
{
    $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';

    if(file_exists($path))
    {
        require_once $path;
    }
    else
    {
        $controller = '';
    }
}

【问题讨论】:

    标签: joomla joomla3.0


    【解决方案1】:

    JController::getInstance() 已被删除。请改用JControllerLegacy::getInstance()

    【讨论】:

      猜你喜欢
      • 2017-10-17
      • 2012-08-18
      • 2013-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-11
      • 2013-11-03
      相关资源
      最近更新 更多