Undefined variable error

GK User
Sun Jan 22, 2012 7:02 pm
I have Joomla 1.7.3 and the latest version of Sporter. I have gone into the template manager and assigned widths to Layouts>Right and Right2.


If I assign a module to right_right, I get the following error:

Notice: Undefined variable: gkRightRight in /home/macnse/public_html/jupgrade17/templates/gk_sporter/layouts/blocks/right.php on line 47
style=width:>

Here is an example page:
http://www.macnseitz.com/jupgrade17/ind ... ght-column

I get a similar error if I assign the module to right_left, except the undefined variable in the error is gkRightLeft

If I assign a module to both right_right AND right_left, no error is displayed:
http://www.macnseitz.com/jupgrade17/ind ... wo-columns


Here are the contents of right.php, which I have not altered in any way:

Code: Select all
<?php

// No direct access.
defined('_JEXEC') or die;

$right_column_middle_class = ' oneCol';

if($this->modules('right_left and right_right')) {
   $right_column_middle_class = ' twoCol';
}
if($this->getParam("cwidth_position", '') == 'style') {
    // right column
    if($this->modules('right_left and right_right')) {
         $gkRightLeft = $this->getParam('right2_column_width', '50'). '%';
         $gkRightRight = (100 - $this->getParam('right2_column_width', '50')) . '%';
    }
    // all columns
    $left_column = $this->modules('left_top + left_bottom + left_left + left_right');
    $right_column = $this->modules('right_top + right_bottom + right_left + right_right');
   
    if($left_column && $right_column) {
         $gkRight = $this->getParam('right_column_width', '20'). '%';
    }  elseif ( $right_column ) {
         $gkRight = $this->getParam('right_column_width', '20'). '%';
    }
}
?>


<?php if($this->modules('right_top + right_bottom + right_left + right_right')) : ?>
<div id="gkRight" class="gkMain gkCol <?php echo $this->generatePadding('gkRightColumn'); ?>" <?php if($this->getParam("cwidth_position", '') == 'style') echo "style=width:".$gkRight;  ?>>
   <?php if($this->modules('right_top')) : ?>
   <div id="gkRightTop" class="gkMain <?php echo $this->generatePadding('gkRightTop'); ?>">
      <jdoc:include type="modules" name="right_top" style="<?php echo $this->module_styles['right_top']; ?>" />
   </div>
   <?php endif; ?>

   <?php if($this->modules('right_left + right_right')) : ?>
   <div id="gkRightMiddle" class="gkMain<?php echo $right_column_middle_class; ?> <?php echo $this->generatePadding('gkRightMiddle'); ?>">
      <?php if($this->modules('right_left')) : ?>
      <div id="gkRightLeft" class="gkMain gkCol <?php echo $this->generatePadding('gkRightLeft'); ?>" <?php if($this->getParam("cwidth_position", '') == 'style') echo "style=width:".$gkRightLeft;  ?>>
         <jdoc:include type="modules" name="right_left" style="<?php echo $this->module_styles['right_left']; ?>" />
      </div>
      <?php endif; ?>   
      
      <?php if($this->modules('right_right')) : ?>
      <div id="gkRightRight" class="gkMain gkCol <?php echo $this->generatePadding('gkRightRight'); ?>" <?php if($this->getParam("cwidth_position", '') == 'style') echo "style=width:".$gkRightRight;  ?>>
         <jdoc:include type="modules" name="right_right" style="<?php echo $this->module_styles['right_right']; ?>" />
      </div>
      <?php endif; ?>         
   </div>
   <?php endif; ?>   

   <?php if($this->modules('right_bottom')) : ?>
   <div id="gkRightBottom" class="gkMain <?php echo $this->generatePadding('gkRightBottom'); ?>">
      <jdoc:include type="modules" name="right_bottom" style="<?php echo $this->module_styles['right_bottom']; ?>" />
   </div>
   <?php endif; ?>   
</div>
<?php endif; ?>


Help? :)
User avatar
Junior Boarder

GK User
Mon Jan 30, 2012 6:47 pm
I'm also having the problem...any solution?
User avatar
Fresh Boarder

GK User
Mon Jan 30, 2012 10:58 pm
bizzo wrote:I'm also having the problem...any solution?


Nope, not one that addresses the actual problem. Gavick does a lot of things right, but support in this forum leaves a lot to be desired.

For now, I am just assigning modules to right_top.
User avatar
Junior Boarder

GK User
Thu Mar 08, 2012 8:03 pm
Im getting the same error.
Tried to disable error reporting in jooma server and php.ini and I have the same error.

Can we fix this in the code?
User avatar
Fresh Boarder

GK User
Thu Mar 08, 2012 11:41 pm
Please go to template settings and under advanced settings tab in columns width generation place choose 'header area' not style tags. For future please configure you server according to Joomla! requirements, this was mentioned many, many times on our forum - display_errors option need to be DISABLED.
User avatar
Platinum Boarder


cron