将Joomla 1.5升级到Joomla 2.5

时间:2014-02-04 23:12:46

标签: php joomla joomla2.5 joomla1.5

我有很多问题将自定义Joomla网站从Joomla 1.5升级到2.5。我在后端安装了模板,但前端仍然显示错误消息。我真的不太了解PHP,所以我很难弄清楚究竟发生了什么。

首先,我使用jupgrade升级网站的核心。

然后我按照此视频为Joomla 2.5准备了自定义网站模板: http://www.youtube.com/watch?v=xqnm1DJn3jE

在我的“/ jupgrade / templates / my-template / menus /文件夹中有一个名为Base.class.php的文件。

当我尝试访问我的网站的新主页时,在/ jupgrade /文件夹中,我收到以下错误:

Fatal error: Class 'JParameter' not found in ../public_html/jupgrade/templates/my-template/menus/Base.class.php on line 46

第46行读到:

function createParameterObject($param, $path='', $type='menu') {
return new JParameter($param, $path); }

根据这个网站(http://docs.joomla.org/Upgrading_a_Joomla_1.5_extension_to_Joomla_1.6#Converting_Your_JParameters_to_JForms),我需要将“JParameters”更改为“JForm”。

当我更改它时,我现在在转到主页时收到以下错误:

 Catchable fatal error: Argument 2 passed to JForm::__construct() must be an array, string given, called in ../public_html/jupgrade/templates/my-template/menus/Base.class.php on line 46 and defined in ../public_html/jupgrade/libraries/joomla/form/form.php on line 80

form.php文件的第80行是:

public function __construct($name, array $options = array())
{
    // Set the name for the form.
    $this->name = $name;

    // Initialise the JRegistry data.
    $this->data = new JRegistry;

    // Set the options if specified.
    $this->options['control'] = isset($options['control']) ? $options['control'] : false;
}

有没有人对如何解决这个问题有任何建议?

1 个答案:

答案 0 :(得分:0)

实际上您不需要将JParameter更改为JForm。我们之前遇到过确切的问题,我们已经解释过here

默认情况下,Joomla 2.5中不再包含JParameter。简而言之,您需要使用jinclude指令。这实际上是解决问题的最快方法。

还原您的更改,只需包含JParameter类。

相关问题