garima
garima

Reputation: 5244

joomla template error

I installed a joomla template but the following error comes up every time:


Notice: Undefined variable: my in C:\xampp\htdocs\Joomla16\templates\cartion\index.php on line 36
Notice: Trying to get property of non-object in C:\xampp\htdocs\Joomla16\templates\cartion\index.php on line 36



FATAL ERROR: CALL TO A MEMBER FUNCTION GETCFG() ON A NON-OBJECT IN C:\XAMPP\HTDOCS\JOOMLA16\TEMPLATES\CARTION\SUCKERFISH.PHP ON LINE 763


How should I go about resolving this?

I am sharing the code as well:

<jdoc:include type="head" />
<?php if($my->id) initEditor(); ?> #lin36

 if ($mainframe->getCfg('shownoauth')) {



  $sql = ("SELECT m.*, count(p.parent) as cnt" .



"\nFROM #__menu AS m" .#763

Upvotes: 0

Views: 810

Answers (2)

aldo praherda
aldo praherda

Reputation: 11

//global $mainframe was deprecated in Joomla 1.5 and completely removed from Joomla 1.6. 
//global $mainframe;
$app =& JFactory::getApplication('site');
$app->initialise();
//$access   = !$mainframe->getCfg( 'shownoauth' );
$access = $app->getCfg( 'shownoauth' );

Upvotes: 1

Sudantha
Sudantha

Reputation: 16194

I would suspect it's because $mainframe is not defined,

$mainframe = new some_classname(); ?

also looks like this template missing the required classes which defines $mainframe

Upvotes: 0

Related Questions