Привет Joomlaтворцам.
У меня следующая проблема: установил Joomla 2.5, поставил шаблон sj tech с плагинами, компонентом К2, настроил модули но неожиданно для себя обнаружил что при попытке зайти просмотреть полностью любой материал на сайте или вызвать окно напоминания логина или пароля выскакивает ошибка. Еще кое что, статьи и категории создаются не средствами Joomla, а через компонент К2.
Собственно сама ошибка:
Fatal error: Call to a member function get() on a non-object in /templates/sj_tech/index.php on line 62Ссылка страницы:
/index.php/component/k2/item/4-futbolnyi-match-ukraina-polshcha-u-kharkovi-proide-bez-hliadachivКод на 61, 62 строке файла индекс.пхп:
// Page class sufix
$cls_body .=  JFactory::getApplication()->getMenu()->getActive()->params->get('pageclass_sfx');
Код всего файла индекс.пхп:
<?php
/*
 * ------------------------------------------------------------------------
 * Copyright (C) 2009 - 2013 The YouTech JSC. All Rights Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: The YouTech JSC
 * Websites: http://www.smartaddons.com - http://www.cmsportal.net
 * ------------------------------------------------------------------------
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
// Check yt plugin
if(!defined('YT_FRAMEWORK')){
	throw new Exception(JText::_('INSTALL_YT_PLUGIN'));
}
if(!defined('J_TEMPLATEDIR')){
	define('J_TEMPLATEDIR', JPATH_SITE.J_SEPARATOR.'templates'.J_SEPARATOR.$this->template);
}
// Include file: frame_inc.php
include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'frame_inc.php');
// Check direction for HTML
$dir = ($yt->getParam('direction') == 'rtl')? ' dir="rtl"' : '';
?>
<!DOCTYPE html>
<html<?php echo $dir; ?> lang="<?php echo $this->language; ?>">
<head>
  <!-- <?php echo $yt->template.' '.$yt->templateVersion(); ?> -->
<jdoc:include type="head" />
	<?php
	$browser = new Browser(); ?>
    <meta name="HandheldFriendly" content="true"/>
	<meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <?php if ($browser->getBrowser()== Browser::BROWSER_IPHONE ){?>
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-touch-fullscreen" content="yes" />
    <?php }
	// Include CSS, js
	include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'head.php');
	?>
</head>
<?php
	//
	$cls_body = '';
	//render a class for home page
	$cls_body .= $yt->isHomePage()? 'homepage ' : '';
	//add a class for each component
	$cls_body .= (JRequest::getVar('option')!= null)? JRequest::getVar('option').' ' : '';
	//add a view class which helps you easy to style
	$cls_body .= (JRequest::getVar('view')!= null)? 'view-' . JRequest::getVar('view'). ' ' : '';
	//for stype. With each style, we will use one class
	$cls_body .= $yt->getParam('templateColor').' ';
	//for RTL direction
	$cls_body .= ($direction == 'rtl')? 'rtl' . ' ' : '';
	//add a class according to the template name
	$cls_body .= $yt->template. ' ';
	// Layout name
	$cls_body .= 'layout_'.$layout. ' ';
	// Page class sufix
	//$cls_body .=  JFactory::getApplication()->getMenu()->getActive()->params->get('pageclass_sfx');
	// class slideshow
	$cls_body .=  ($doc->countModules('slideshow'))?'':'no-slider ';
	$cls_body .=  ' yt-jv'.J_VERSION;
?>
<body id="bd" class="<?php echo $cls_body; ?>" onLoad="prettyPrint()">
	<jdoc:include type="modules" name="debug" />
	<section id="yt_wrapper">
		<a id="top" name="scroll-to-top"></a>
		<?php
		/*render blocks. for positions of blocks, please refer layouts folder. */
		foreach($yt_render->arr_TB as $tagBD) {
			//BEGIN Check if position not empty
			if( $tagBD["countModules"] > 0 ) {
				// BEGIN: Content Area
				if( ($tagBD["name"] == 'content') ) {
					//class for content area
					$cls_content  = $tagBD['class_content'];
					$cls_content  .= ' block';
					echo "<{$tagBD['html5tag']} id=\"{$tagBD['id']}\" class=\"{$cls_content}\">";
					?>
						<div class="yt-main">
							<div class="yt-main-in1 container">
								<div class="yt-main-in2 row-fluid">
        							<?php
									$countL = $countR = $countM = 0;
									// BEGIN: foreach position of block content
									// IMPORTANT: Please do not edit this block
									foreach($tagBD['positions'] as $position):
										include(J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'block-content.php');
									endforeach;
									// END: foreach position of block content
									?>
								</div>
							</div>
						</div>
                    <?php
					echo "</{$tagBD['html5tag']}>";
					?>
					<?php
				// END: Content Area
				// BEGIN: For other blocks
				} elseif ($tagBD["name"] != 'content'){
                    echo "<{$tagBD['html5tag']} id=\"{$tagBD['id']}\" class=\"block\">";
					?>
						<div class="yt-main">
							<div class="yt-main-in1 container">
								<div class="yt-main-in2 row-fluid">
								<?php
								if( !empty($tagBD["hasGroup"]) && $tagBD["hasGroup"] == "1"){
									// BEGIN: For Group attribute
									$flag = '';
									$openG = 0;
									$c = 0;
									foreach( $tagBD['positions'] as $posFG ):
										$c = $c + 1;
										if( $posFG['group'] != "" && $posFG['group'] != $flag){
											$flag = $posFG['group'];
											$more_attr = '';
											$more_attr .= (isset($yt_render->arr_GI[$posFG['group']]['data-wide']))?' data-wide="'.$yt_render->arr_GI[$posFG['group']]['data-wide'].'"':'';
											$more_attr .= (isset($yt_render->arr_GI[$posFG['group']]['data-normal']))?' data-normal="'.$yt_render->arr_GI[$posFG['group']]['data-normal'].'"':'';
											$more_attr .= (isset($yt_render->arr_GI[$posFG['group']]['data-tablet']))?' data-tablet="'.$yt_render->arr_GI[$posFG['group']]['data-tablet'].'"':'';
											$more_attr .= (isset($yt_render->arr_GI[$posFG['group']]['data-stablet']))?' data-stablet="'.$yt_render->arr_GI[$posFG['group']]['data-stablet'].'"':'';
											$more_attr .= (isset($yt_render->arr_GI[$posFG['group']]['data-mobile']))?' data-mobile="'.$yt_render->arr_GI[$posFG['group']]['data-mobile'].'"':'';
											if ($openG == 0) {
												$openG = 1;
												$groupnormal = 'group-' . $flag.$tagBD['class_groupnormal'];
												echo '<div class="' . $groupnormal . ' ' . $yt_render->arr_GI[$posFG['group']]['class'] . '"'.$more_attr.'>' ;
												echo $yt->renPositionsGroup($posFG);
												if($c == count( $tagBD['positions']) ) {
													echo '</div>';
												}
											} else {
												$openG = 0;
												$groupnormal = 'group-' . $flag;
												echo '</div>';
												echo '<div class="' . $groupnormal . ' '. $yt_render->arr_GI[$posFG['group']]['class'] . '"'.$more_attr.'>' ;
												echo $yt->renPositionsGroup($posFG);
											}
										} elseif ($posFG['group'] != "" && $posFG['group'] == $flag){
											echo $yt->renPositionsGroup($posFG);
											if($c == count( $tagBD['positions']) ) {
												echo '</div>';
											}
										}elseif($posFG['group']==""){
											if($openG ==1){
												$openG = 0;
												echo '</div>';
											}
											echo $yt->renPositionsGroup($posFG);
										}
									endforeach;
									// END: For Group attribute
								}else{ 
									// BEGIN: for Tags without group attribute
									if(isset($tagBD['positions'])){
										echo $yt->renPositionsNormal($tagBD['positions'], $tagBD["countModules"]);
									}
									// END: for Tags without group attribute
								}
								?>
								</div>
							</div>
						</div>
                    <?php
					echo "</{$tagBD['html5tag']}>";
					?>
			<?php
			   }
			   // END: For other blocks
			}
			// END Check if position not empty
		}
		//END: For
		?>
        <?php
		include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'special-position.php');
		include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'bottom.php');
		if($yt->getParam('responsiveMenu')=='sidebar'){
		?>
		<div class="block yt-off-sideresmenu"><div class="yt-sideresmenu"></div></div>
		<?php
		}
		?>
	</section>
</body>
</html>
Что пробовали: вкл/выкл ЧПУ, отключение почти всех модулей (кроме слайдера), отключения плагинов К2, заливали пустой файл params.ini с правами на запись, комментировали 62 строку (статьи показывало но слетал шаблон).
Как говорит товарищ та строка просто формирует стили для бади, но по какой то причине они не формируются и вылетает окно с ошибкой.
Буду признателен за помощь и советы.