template gives errormsg, need changes in a ja_vars_1.5 file

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
nettemor
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Fri Dec 08, 2006 10:44 pm
Location: Norway

template gives errormsg, need changes in a ja_vars_1.5 file

Post by nettemor » Sat Jun 08, 2013 6:38 pm

Hi,
I have converted a 1.5 site to a 2.5 site.
But when accessing the front page of the site i get some errors. Seems to me it has to do with a ja_vars_1.5.php file that are called from the template index.php file. Seems to be some coding standards that are changed from 1.5 to 2.5
(this template is not converted to 2.5 by JoomlArt, only exists in 1.5)

My php skills are lacking, so cant see what i need to change, but i hope someone with better php skills than me will see the faults pretty fast.

Here are the errors i get when accessing the frontpage:

Code: Select all


( ! ) Strict standards: Non-static method JA_Base::createParameterObject() should not be called statically, assuming $this from incompatible context in C:\wamp\www\sorensen-ny\templates\bew_sorensen\ja_vars_1.5.php on line 45
Call Stack
#	Time	Memory	Function	Location
1	0.0009	152096	{main}( )	..\index.php:0
2	0.2829	5440728	JSite->render( )	..\index.php:48
3	0.2832	5441488	JDocumentHTML->parse( )	..\application.php:259
4	0.2832	5441512	JDocumentHTML->_fetchTemplate( )	..\html.php:414
5	0.2835	5441768	JDocumentHTML->_loadTemplate( )	..\html.php:591
6	0.2843	5500296	require( 'C:\wamp\www\sorensen-ny\templates\bew_sorensen\index.php' )	..\html.php:531
7	0.2863	5517368	include_once( 'C:\wamp\www\sorensen-ny\templates\bew_sorensen\ja_vars_1.5.php' )	..\index.php:15

( ! ) Fatal error: Class 'JParameter' not found in C:\wamp\www\sorensen-ny\templates\bew_sorensen\ja_menus\Base.class.php on line 37
Call Stack
#	Time	Memory	Function	Location
1	0.0009	152096	{main}( )	..\index.php:0
2	0.2829	5440728	JSite->render( )	..\index.php:48
3	0.2832	5441488	JDocumentHTML->parse( )	..\application.php:259
4	0.2832	5441512	JDocumentHTML->_fetchTemplate( )	..\html.php:414
5	0.2835	5441768	JDocumentHTML->_loadTemplate( )	..\html.php:591
6	0.2843	5500296	require( 'C:\wamp\www\sorensen-ny\templates\bew_sorensen\index.php' )	..\html.php:531
7	0.2863	5517368	include_once( 'C:\wamp\www\sorensen-ny\templates\bew_sorensen\ja_vars_1.5.php' )	..\index.php:15
8	0.2938	5736152	JA_Base->createParameterObject( )	..\ja_vars_1.5.php:45
And here are the ja_vars_1.5 file:

Code: Select all

// no direct access
defined('_JEXEC') or die;JHtml::_('behavior.framework', true);

include_once (dirname(__FILE__).DS.'/ja_templatetools_1.5.php');
// jvh $mainframe =& JFactory::getApplication('site');
$mainframe = JFactory::getApplication('site');


if (defined('_DEMO_MODE_')) $tmpTools = new JA_Tools($this, array(JA_TOOL_MENU, JA_TOOL_COLOR));	
else $tmpTools = new JA_Tools($this);

$tmpTools->setScreenSizes (array('wide','narrow'));
$tmpTools->setColorThemes (array('Default','Cyan','Red'));

# Auto Collapse Divs Functions ##########
$ja_left = $this->countModules('left');
$ja_right = $this->countModules('right');

if ( $ja_left && $ja_right ) {
	$divid = '';
	} elseif ( $ja_left ) {
	$divid = '-fr';
	} elseif ( $ja_right ) {
	$divid = '-fl';
	} else {
	$divid = '-f';
}

//Main navigation
$ja_menutype = $tmpTools->getParam(JA_TOOL_MENU);
$jamenu = null;
if ($ja_menutype != 'none') {
include_once( dirname(__FILE__).DS.'ja_menus/Base.class.php' );
$japarams = JA_Base::createParameterObject('');
$japarams->set( 'menutype', $tmpTools->getParam('menutype', 'mainmenu') );
$japarams->set( 'menu_images_align', 'left' );
$japarams->set( 'menupath', $tmpTools->templateurl() .'/ja_menus');
$japarams->set('menu_title', 0);
switch ($ja_menutype) {
	case 'dl':
		$menu = "DLmenu";
		include_once( dirname(__FILE__).DS.'ja_menus/'.$menu.'.class.php' );
		break;
	case 'css':
		$menu = "CSSmenu";
		include_once( dirname(__FILE__).DS.'ja_menus/'.$menu.'.class.php' );
		break;
	case 'moo':
		$menu = "Moomenu";
		include_once( dirname(__FILE__).DS.'ja_menus/'.$menu.'.class.php' );
		break;
	case 'split':
	default:
		$menu = "Splitmenu";
		include_once( dirname(__FILE__).DS.'ja_menus/'.$menu.'.class.php' );
		break;
}
$menuclass = "JA_$menu";
$jamenu = new $menuclass ($japarams);

$hasSubnav = false;
if ($jamenu->hasSubMenu (1) && $jamenu->showSeparatedSub ) 
	$hasSubnav = true;
}	
//End for main navigation

?>


Nomad1108
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Aug 22, 2015 3:27 pm

Re: template gives errormsg, need changes in a ja_vars_1.5 f

Post by Nomad1108 » Sun Aug 23, 2015 3:44 pm

Same problem here when converting to Joomla 3.4.
Any help would be welcome. Thanks!

nettemor
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Fri Dec 08, 2006 10:44 pm
Location: Norway

Re: template gives errormsg, need changes in a ja_vars_1.5 f

Post by nettemor » Wed Sep 16, 2015 2:38 pm

Hi Nomad1108,

Its been a while but if i dont remember wrong it had to do with me keeping the overrides in the html catalog (\template\html\com....)
Try to rename the whole html catalog and see if that is right.

Sorry i cant be more spesific, should have posted the answer right away after the fix.

Nomad1108
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Aug 22, 2015 3:27 pm

Re: template gives errormsg, need changes in a ja_vars_1.5 f

Post by Nomad1108 » Wed Sep 23, 2015 1:33 pm

Hi nettemore,

Thank you for your reply but I don't see what you mean by renaming the html catalog. :/

Here are the error messages that I've got:

Code: Select all

Strict Standards: Non-static method JA_Base::createParameterObject() should not be called statically, assuming $this from incompatible context in /home/nomadstu/www/dev/templates/ja_sulfur/ja_vars_1.5.php on line 42

Notice: Undefined variable: module in /home/nomadstu/www/dev/templates/ja_sulfur/ja_menus/Base.class.php on line 38

Notice: Trying to get property of non-object in /home/nomadstu/www/dev/templates/ja_sulfur/ja_menus/Base.class.php on line 38

Fatal error: Call to a member function set() on a non-object in /home/nomadstu/www/dev/templates/ja_sulfur/ja_vars_1.5.php on line 43
The lines in ja_vars_1.5.php are the following:

Code: Select all

$japarams = JA_Base::createParameterObject('');
$japarams->set( 'menutype', $tmpTools->getParam('menutype', 'mainmenu') );
and in Base.class.php:

Code: Select all

function createParameterObject($param, $path='', $type='menu') {
	    $params = new JRegistry();
            $params->loadString($module->params);
            $params->get('param_name');

nettemor
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Fri Dec 08, 2006 10:44 pm
Location: Norway

Re: template gives errormsg, need changes in a ja_vars_1.5 f

Post by nettemor » Wed Sep 23, 2015 2:13 pm

Hi,
If you check your template catalogue, ex: \template_name\html
you will see that there is likely a catalogue called html here.
try to rename this catalogue to like \template_name\old_html

If that does not help, try to rename the ja_vars_1.5.php file to xxxja_vars_1.5.php
(just to drop it)

Cause i am quite sure that i just renamed either the catalogue or the file to make it work.

Nomad1108
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Aug 22, 2015 3:27 pm

Re: template gives errormsg, need changes in a ja_vars_1.5 f

Post by Nomad1108 » Wed Sep 23, 2015 2:31 pm

Ok I see what you mean but when I rename the html file, I still get the same error messages and if I rename ja_vars_1.5.php, I get the following:

Code: Select all

Warning: include_once(/home/nomadstu/www/dev/templates/ja_sulfur/ja_vars_1.5.php): failed to open stream: No such file or directory in /home/nomadstu/www/dev/templates/ja_sulfur/index.php on line 15

Warning: include_once(): Failed opening '/home/nomadstu/www/dev/templates/ja_sulfur/ja_vars_1.5.php' for inclusion (include_path='.:/usr/local/php5.4/lib/php') in /home/nomadstu/www/dev/templates/ja_sulfur/index.php on line 15

nettemor
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Fri Dec 08, 2006 10:44 pm
Location: Norway

Re: template gives errormsg, need changes in a ja_vars_1.5 f

Post by nettemor » Wed Sep 23, 2015 3:01 pm

then i am sorry i dont recall what i did to fix this :-(

Nomad1108
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Aug 22, 2015 3:27 pm

Re: template gives errormsg, need changes in a ja_vars_1.5 f

Post by Nomad1108 » Wed Sep 23, 2015 3:13 pm

I think I will have to drop this template but can't find another one good enough. Too bad JoomlArt doesn't make it available for Joomla 3. :(


Locked

Return to “Migrating and Upgrading to Joomla! 2.5”