0
votes

I'm having many issues upgrading a custom Joomla site from Joomla 1.5 to 2.5. I have the template installed on the back end, but the front end keeps displaying error messages. I don't really know too much PHP, so I'm having a hard time trying to figure out what is all going on.

First, I use jupgrade to upgrade the core of the site.

Then I followed this video to make the custom site template ready for Joomla 2.5: http://www.youtube.com/watch?v=xqnm1DJn3jE

In my "/jupgrade/templates/my-template/menus/ folder there is a file called Base.class.php.

When I try to go the new home page of my site, in the /jupgrade/ folder, I get the following error:

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

Line 46 reads:

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

According to this website (http://docs.joomla.org/Upgrading_a_Joomla_1.5_extension_to_Joomla_1.6#Converting_Your_JParameters_to_JForms) I need to change "JParameters" to "JForm".

When I change it, I now am getting the following error when going to the home page:

 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

Line 80 of the form.php file is:

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;
}

Does anyone have any advice on how to solve this issue?

1
When you say "I changed it" do you mean you literally just searched and replaced? - Elin
Try changing new JParemeter to new JRegistry as this has been removed - Lodder
Elin - Yes I literally just swaped out any instance of "JParemeter" and replaced it with "JForm". That is how I understood from the article I linked to above. - user2762748

1 Answers

0
votes

Actually you don't need to change JParameter to JForm. We had the exact issues before and we have explained them here.

JParameter is no longer included by default in Joomla 2.5. In short, you will need to include using the jinclude directive. That's actually the fastest way to solve your problem.

Revert back your changes and just include the JParameter class.