Undefined variable: module_styles

GK User
Tue Oct 21, 2014 1:17 am
Hi,

When using &tmpl=component I am receiving the following error

Notice: Undefined variable: module_styles in .../templates/gk_university/lib/gk.framework.php on line 76

Thanks.
User avatar
Fresh Boarder

GK User
Tue Oct 21, 2014 5:43 pm
Hello,

Are you using a latest version of the template?
User avatar
Administrator

GK User
Tue Oct 21, 2014 10:52 pm
dziudek wrote:Hello,

Are you using a latest version of the template?


Yes, the template is up to date.
User avatar
Fresh Boarder

GK User
Wed Oct 22, 2014 7:57 am
Please open file component.php in the template directory and please change the following fragment:

Code: Select all
// include framework classes and files
require_once('lib/gk.framework.php');


to:

Code: Select all
// include framework classes and files
require_once('lib/framework/gk.const.php');
require_once('lib/gk.framework.php');
User avatar
Administrator

GK User
Wed Oct 22, 2014 10:53 am
Hi, I have tried that without success. The error remains. There is no lib/framework.gk.const.php file in the University template so I copied it from Simplicity and added your code to component.php but it hasn't worked.
User avatar
Fresh Boarder

GK User
Wed Oct 22, 2014 11:10 am
sadafk wrote:Hi, I have tried that without success. The error remains. There is no lib/framework.gk.const.php file in the University template so I copied it from Simplicity and added your code to component.php but it hasn't worked.


Whoops I meant lib/framework/gk.const.php
User avatar
Fresh Boarder

GK User
Wed Oct 22, 2014 12:50 pm
Found an issue - please remove from the gk.framework.php file the following lines:

Code: Select all
// put the styles to class field
$this->module_styles = $module_styles;


It is unnecessary as the module_styles variable is not used since the University template.
User avatar
Administrator

GK User
Wed Oct 22, 2014 1:19 pm
I have commented out all mention of the variable module_styles in the following places to resolve the issue.

Web Development\Joomla Templates\GavickPro University_quickstart_J!3 \gk_university_quickstart_J30\templates\gk_university\admin\elements\moduleoverride.php
18 $module_styles = explode(',', $this->element['module_styles']);
26 foreach($module_styles as $style) {
3 matches in C:\Web Development\Joomla Templates\GavickPro University_quickstart_J!3 \gk_university_quickstart_J30\templates\gk_university\admin\elements\moduleoverride.php
C:\Web Development\Joomla Templates\GavickPro University_quickstart_J!3 \gk_university_quickstart_J30\templates\gk_university\layouts\blocks\tools\login.php
21 <jdoc:include type="modules" name="login" style="<?php echo $this->module_styles['login']; ?>" />
30 <jdoc:include type="modules" name="usermenu" style="<?php echo $this->module_styles['usermenu']; ?>" />
2 matches in C:\Web Development\Joomla Templates\GavickPro University_quickstart_J!3 \gk_university_quickstart_J30\templates\gk_university\layouts\blocks\tools\login.php
C:\Web Development\Joomla Templates\GavickPro University_quickstart_J!3 \gk_university_quickstart_J30\templates\gk_university\lib\gk.framework.php
76 $this->module_styles = $module_styles;
2 matches in C:\Web Development\Joomla Templates\GavickPro University_quickstart_J!3 \gk_university_quickstart_J30\templates\gk_university\lib\gk.framework.php
C:\Web Development\Joomla Templates\GavickPro University_quickstart_J!3 \gk_university_quickstart_J30\templates\gk_university\lib\framework\helper.layout.php
18 public $module_styles;
32 $this->module_styles = $parent->module_styles;
3 matches in C:\Web Development\Joomla Templates\GavickPro University_quickstart_J!3 \gk_university_quickstart_J30\templates\gk_university\lib\framework\helper.layout.php
User avatar
Fresh Boarder


cron