Error Notice Line 633 and 635

Support forum dedicated to free and advanced Joomla content presentation module with various layout options and data sources support.
GK User
Mon Aug 20, 2012 10:41 pm
My homepage is displaying these errors, any ideas?

Joomla 2.5.4
Centos 6.3


Notice: Undefined variable: itemid in /var/www/vhosts/**************.co.uk/httpdocs/modules/mod_news_pro_gk4/tmpl/layout.parts.php on line 633

Notice: Undefined variable: news_text in /var/www/vhosts/**************.co.uk/httpdocs/modules/mod_news_pro_gk4/tmpl/layout.parts.php on line 635
User avatar
Fresh Boarder

GK User
Mon Aug 20, 2012 10:54 pm
Hi

That's php notices. You can disable on php.ini file.
If you don't have access to this php configuration of your server, you can try adding this line on your template index.php file.

Code: Select all
<?php ini_set('display_errors', 'Off')?>


This must be on the first line of the document.

Cheers
User avatar
Platinum Boarder

GK User
Mon Aug 20, 2012 10:59 pm
GRIPPATANK wrote:My homepage is displaying these errors, any ideas?

Joomla 2.5.4
Centos 6.3


Notice: Undefined variable: itemid in /var/www/vhosts/**************.co.uk/httpdocs/modules/mod_news_pro_gk4/tmpl/layout.parts.php on line 633

Notice: Undefined variable: news_text in /var/www/vhosts/**************.co.uk/httpdocs/modules/mod_news_pro_gk4/tmpl/layout.parts.php on line 635


I have even tried turning off the error_reporting and the joomla error reporting, and it still shows!
User avatar
Fresh Boarder

GK User
Mon Aug 20, 2012 11:05 pm
Okay so i checked template index.php and interestingly it has nothing to do with my php.ini (i run a vps) - its the code in the index.php file!


// No direct access.
defined('_JEXEC') or die;
// enable showing errors in PHP
ini_set('error_reporting', E_ALL);
ini_set('display_errors','On');
// include framework classes and files
require_once('lib/gk.framework.php');
// run the framework
$tpl = new GKTemplate($this, $GK_TEMPLATE_MODULE_STYLES);

// EOF


I just changed error_reporting to off from on, but then went further and deleted the ini_set lines, as if you have access to the php.ini or if in my case your running plesk and can run individual php.ini files for each website you dont need this in the index.php.

Any reason why this is hardcoded like this??
User avatar
Fresh Boarder

GK User
Mon Aug 20, 2012 11:19 pm
GRIPPATANK wrote:
I just changed error_reporting to off from on, but then went further and deleted the ini_set lines, as if you have access to the php.ini or if in my case your running plesk and can run individual php.ini files for each website you dont need this in the index.php.

Any reason why this is hardcoded like this??


No special reason

If you delete

Code: Select all
// enable showing errors in PHP
ini_set('error_reporting', E_ALL);
ini_set('display_errors','On');


and works fine from your php.ini file, you up running ;)

Cheers
User avatar
Platinum Boarder

GK User
Wed Mar 27, 2013 1:30 pm
Hi i have the same error but my template (gk_magazine) now is a blank page.
If i disable the module (mod_news_pro_gk4) the template is all right.
User avatar
Fresh Boarder


cron