Post by terrynshed » Tue Jan 29, 2013 2:16 pm

Hi,

Working on some errors that continually pop up into my error log. I use the welcome module on my home page, and every time I go to my home page I get a total of 4 of the same error message shown below:

PHP Notice: Undefined variable: heading_title in /home/*****/public_html/catalog/view/theme/*****/template/module/welcome.tpl on line 1

I am using 4 welcome modules, so it looks as if each module is producing this error. Website is working just fine.

My welcome.tpl has the default file without any changes. I figure there is another file causing this error, but at this point I have no idea where to look.

Code: Select all

<div class="welcome"><?php echo $heading_title; ?></div>
<?php echo $message; ?>
This is filling my log files very quickly. Any ideas what might be causing this?

Thanks,

Terry

New member

Posts

Joined
Fri Jan 20, 2012 5:35 pm

Post by ChetanCx » Tue Jan 29, 2013 8:45 pm

make sure your catalog/controller/module/welcome.php has the following line

Code: Select all

$this->data['heading_title'] = sprintf($this->language->get('heading_title'), $this->config->get('config_name'));

User avatar
Active Member

Posts

Joined
Sat Dec 08, 2012 8:12 pm

Post by terrynshed » Wed Jan 30, 2013 12:40 am

I checked thefile, and this exact line of code was commented out.

So I removed the /* */ to un-comment the line and the error went away.

BUT, now on my homepage, right above each welcome module that is displayed it says heading_title.

I checked my language/english/module/welcome.php file and it was also commented out which explains the above.

Code: Select all

<?php
/*$_['heading_title'] = 'Welcome to %s';*/
?>
So I removed the /* */ and now instead of saying heading_title, it says Welcome to my website in large text above each welcome module.

I must have modified these two files to remove the 'Welcome to...' message.

Is there a better way to remove this message from appearing above each of my welcome modules and eliminated this log filling error?

Thanks for your help.

Terry

New member

Posts

Joined
Fri Jan 20, 2012 5:35 pm

Post by ChetanCx » Wed Jan 30, 2013 12:53 am

check your catalog/language/english/module/welcome.php it should contain

Code: Select all

<?php
$_['heading_title'] = 'Welcome to %s';
?>
this generates text like Welcome to your_store_name
also in welcome.tpl file , you can simply replace

Code: Select all

<?php echo $heading_title; ?>
with any text by hardcoding it like

Code: Select all

<?php echo "Welcome to my awesome store"; ?>
or edit the line in language file and use the $heading_title
Last edited by ChetanCx on Wed Jan 30, 2013 1:00 am, edited 1 time in total.

User avatar
Active Member

Posts

Joined
Sat Dec 08, 2012 8:12 pm

Post by terrynshed » Wed Jan 30, 2013 12:59 am

All looks good.

Did a quick search on the forum and in the catalog/view/theme/yourtheme/template/module/welcome.tpl I commented out:

Code: Select all

<div class="welcome"><?php echo $heading_title; ?></div>
No more welcome message, and no more error.

Thanks for the help and pointing me in the right direction. Now I have a few minor errors that pop up once in a while I'll have to slowly tackle.

Terry

New member

Posts

Joined
Fri Jan 20, 2012 5:35 pm

Post by terrynshed » Wed Jan 30, 2013 1:01 am

Hi ChetanCx,

Just saw your post after I posted my last message. Thanks for the info.

I just commented it out and seems to be working well now.

New member

Posts

Joined
Fri Jan 20, 2012 5:35 pm
Who is online

Users browsing this forum: Bing [Bot] and 290 guests