Joomla 1.6 Layout Issue

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
two4god07
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Jan 29, 2011 7:10 pm

Joomla 1.6 Layout Issue

Post by two4god07 » Sat Jan 29, 2011 7:13 pm

The host server I use automatically installs Joomla for you. I just bought a new domain today and was unaware that Joomla 1.6 had been released as I haven't built a new site for a while.

The layout I used to build this new site on my computer.. which I have put hours into... Does not work in Joomla 1.6.

It gives me this error


Fatal error: Call to a member function getCfg() on a non-object in /home/content/08/4759008/html/rnh/templates/siteground-j15-74/index.php on line 57

http://www.rnhministries.org/

Code: Select all

<?php

defined( '_JEXEC' ) or die( 'Restricted access' );
JPlugin::loadLanguage( 'tpl_SG1' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />

<link rel="stylesheet" href="templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/template.css" type="text/css" />

<!--[if lte IE 7]>
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/ie6.css" type="text/css" />
<![endif]-->

</head>
<body class="bg">
	<div class="menu_bg">
		<div id="wrapper">
			<div id="header">
				
				<div id="top_menu">	
					<table cellspacing="0" cellpadding="0" style="margin:0 auto;">
						<tr>						
							<td>
								<div class="top_menu_separator">
									<jdoc:include type="modules" name="user3" />
								</div>
							</td>
						</tr>
					</table>
				<div class="clr"></div>	
				</div>
				<table cellspacing="0" cellpadding="0" class="header_logo">
					<tr>
						<td>
							<div id="logo">
								<a href="index.php"><?php echo $mainframe->getCfg('sitename') ;?></a>
							</div>
						</td>
					</tr>
				</table>
				<div id="news_flash">
					<jdoc:include type="modules" style="rounded" name="top" />
				</div>
			</div>
				<div id="content">
 
					<div class="content_t">

						<?php if($this->countModules('left') and JRequest::getCmd('layout') != 'form') : ?>
						<div id="leftcolumn">	
							<jdoc:include type="modules" name="left" style="rounded" />

							<?php $sg = 'banner'; include "templates.php"; ?>
						</div>
						<?php endif; ?>
	
						
						<?php if($this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>

						<div id="main">

						<?php else: ?>

						<div id="main_full">

						<?php endif; ?>

							<div class="nopad">
				
								<jdoc:include type="message" />

								<?php if($this->params->get('showComponent')) : ?>
<?php if($this->countModules('banner')) : ?>
                           <div id="banner" style="padding-top: 0; margin-top: 0; text-align: center;">
                                    <jdoc:include type="modules" name="banner" style="rounded" />
                           </div>
<?php endif; ?>
									<jdoc:include type="component" />
								<?php endif; ?>
							</div>

						</div>

						
						<?php if($this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>	
						<div id="rightcolumn" style="float:right;">
							<jdoc:include type="modules" name="right" style="rounded" />
						
						</div>					
						<?php endif; ?>

						<div class="clr"></div>	
						<div id="footer">
							<p class="copyright"><? $sg = ''; include "templates.php"; ?></p>
						</div>
						<div id="valid">
							Valid <a href="http://validator.w3.org/check/referer">XHTML</a> and <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>.
						</div>
					</div>
				</div>
		</div>		
	</div>		
		
<jdoc:include type="modules" name="debug" />		
</body>
</html>
Is there any help you can offer me please? Thank you in advance.

mbabker
Joomla! Hero
Joomla! Hero
Posts: 2222
Joined: Sun Feb 28, 2010 8:26 pm

Re: Joomla 1.6 Layout Issue

Post by mbabker » Sat Jan 29, 2011 8:59 pm

This is a partial tutorial, but you need to convert your layout to 1.6 standards. http://docs.joomla.org/Tutorial:Upgrade ... Joomla_1.6

Pay close attention to the use of $mainframe, which is why your getCfg error appears.

two4god07
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Jan 29, 2011 7:10 pm

Re: Joomla 1.6 Layout Issue

Post by two4god07 » Sat Jan 29, 2011 9:18 pm

That site honestly doesn't help much. I'm sorry. It's telling me to change coding in my templatedetails.xml that aren't there.

Here is a copy of my template details

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="template">
	<name>siteground-j15-74</name>
	<version>1.0.0</version>
	<creationDate>10/2008</creationDate>
	<author>SiteGround</author>
	<authorEmail>templates@siteground.com</authorEmail>
	<authorUrl>http://www.siteground.com</authorUrl>
	<copyright>SiteGround</copyright>
	<license>SG TOS</license>
	<description>TEMPLATE_DESCRIPTION</description>
	<files>
		<filename>index.php</filename>
		<filename>templateDetails.xml</filename>
		<filename>template_thumbnail.png</filename>
		<filename>params.ini</filename>
		<filename>templates.php</filename>
		
		<filename>images/bg.gif</filename>
		<filename>images/but.png</filename>
		<filename>images/but_hover.png</filename>
		<filename>images/content.png</filename>
		<filename>images/content_top.png</filename>
		<filename>images/h3.png</filename>
		<filename>images/header.jpg</filename>
		<filename>images/indent1.png</filename>
		<filename>images/indent2.png</filename>
		<filename>images/indent3.png</filename>
		<filename>images/indent4.png</filename>
		<filename>images/l_r_bottom.gif</filename>
		<filename>images/l_r_middle.gif</filename>
		<filename>images/l_r_top.gif</filename>
		<filename>images/menu_row.gif</filename>
		<filename>images/menu_separator.png</filename>
		
		<filename>css/index.html</filename>
		<filename>css/template.css</filename>
		<filename>css/editor.css</filename>
		<filename>css/ie6.css</filename>
<filename>images/sg_background.gif</filename>
	</files>

	<languages>
		<language tag="en-GB">en-GB.tpl_siteground-j15-74.ini</language>
	</languages>
	<administration>
	    <languages folder="admin">
			<language tag="en-GB">en-GB.tpl_siteground-j15-74.ini</language>
		</languages>
    </administration>
	
	<positions>
		<position>user3</position>
		<position>left</position>
		<position>right</position>
		<position>top</position>
		<position>debug</position>	
		<position>banner</position>
	</positions>
	
</install>

mbabker
Joomla! Hero
Joomla! Hero
Posts: 2222
Joined: Sun Feb 28, 2010 8:26 pm

Re: Joomla 1.6 Layout Issue

Post by mbabker » Sat Jan 29, 2011 9:26 pm

The "Objects and Methods" section applies to what is causing your error here.

A lot of the migration pages are still in progress, so there isn't much else available right now.

two4god07
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Jan 29, 2011 7:10 pm

Re: Joomla 1.6 Layout Issue

Post by two4god07 » Sat Jan 29, 2011 9:29 pm

I got the fatal error fixed by adding the "$mainframe = JFactory::getApplication();" on the index.php section.

Everything now shows up on my page.... menus, banner, etc

everything except my articles. 1.5 made it so you could automatically add an article to the front page. I'm assuming "featured article" means the same thing? I made my article a featured article, but it doesn't show up.

pabben
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Oct 15, 2006 2:59 pm
Location: Montevideo
Contact:

Re: Joomla 1.6 Layout Issue

Post by pabben » Thu Feb 03, 2011 6:03 pm

Check this line : <?php if($this->params->get('showComponent')) : ?>


Locked

Return to “Migrating and Upgrading to Joomla! 2.5”