Page 1 of 1

Error in welcome.php

Posted: Fri Apr 20, 2012 10:18 pm
by Josign
I uploaded Swedish language into my store at www.josignart.se and I get this message in the top when you choose Swedish as language in the store:
Notice: Undefined index: 2 in /hsphere/local/home/josignart/josignart.se/catalog/controller/module/welcome.php on line 8

I use Opencart 1.5.2.1 and ThemeGlobal
I just cannot find what is wrong in the code:

<?php
class ControllerModuleWelcome extends Controller {
protected function index($setting) {
$this->language->load('module/welcome');

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

$this->data['message'] = html_entity_decode($setting['description'][$this->config->get('config_language_id')], ENT_QUOTES, 'UTF-8');

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/welcome.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/welcome.tpl';
} else {
$this->template = 'default/template/module/welcome.tpl';
}

$this->render();
}
}
?>

Thank you for any help I can get :)

Re: Error in welcome.php

Posted: Sat Apr 21, 2012 6:55 pm
by inactiveaccount9912
You installed the language pack, after you installed and added the welcome module. Which means you now have to edit the welcome module in admin and insert content for the new language too.

Re: Error in welcome.php

Posted: Tue Oct 29, 2013 11:44 am
by garywinner
I also have the same problem.
Having the error as below in the frontpage.

/catalog/controller/module/welcome.php on line 8

I have tried to find any language php file is missed for defining in the new language.
But after adding all back.
This error still exist.

Hope any one can help .

Cheers!

Re: Error in welcome.php

Posted: Tue Nov 05, 2013 11:37 pm
by inactiveaccount9912
I was refering to edit the welcome module in admin > extension > modules , and for the added modules, click on the new language tab and in the html are insert the content for the new language, you dont have to edit an files.

Re: Error in welcome.php

Posted: Wed Apr 20, 2016 8:33 pm
by Arey
I got the same problem after i added ukrainian languages. I think that this problem happens when controller can't take value from array $setting['description'], because you did not enter welcome text with use new language. Solution is very simple. Add welcome text in admin panel -> modules -> welcome -> edit ->(select new language and add some text). I hope it will help you to solve this trouble.