Post by tillieb » Fri Jul 06, 2012 2:40 am

I'm still trying to fix this.

Code: Select all

Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 13
This error occurs when a user click the banner (logo image) at the top of the store to be taken back to the store home/default page.

I've looked at the controller/module/banner.php file, but I don't think it's something in there.
I don't know how to trace this back to where it's going wrong.

banner_id is defined where? By what? How do I figure this out?

Thank you for your time, I hope someone can help me :(

Newbie

Posts

Joined
Mon Jun 18, 2012 9:40 am

Post by Avvici » Fri Jul 06, 2012 5:11 am

Find this line:

Code: Select all

$results = $this->model_design_banner->getBanner($setting['banner_id']);
The argument $setting is empty for some reason.

Make that line like this:

Code: Select all

if($setting){
		$results = $this->model_design_banner->getBanner($setting['banner_id']);
		}else{
		$results = array();

		}

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by tillieb » Sat Jul 07, 2012 1:02 am

I have tried what you suggested, (which I appreciate your help, thank you so much!! :) )

However, now I'm receiving the same error, but for line 14, where before it was line 13.

I am using 1.5.3.1 (just upgraded from 1.5.2.1, it still did the error in the previous version, too)
I am using a custom template that I made, but I never edited anything to do with a banner, and never edited this file.

Do you have any other suggestions? :(

Thank you for your time.

Newbie

Posts

Joined
Mon Jun 18, 2012 9:40 am

Post by tillieb » Fri Jul 13, 2012 12:52 pm

well, rather then try to figure out what this is..... I just removed the <a href=""> tag from the logo in the template file. Though this is not ideal. For *my* store, I already have a link to the stores homepage in the header elsewhere, so i don't need the logo to take you back to the home page.

Done. and Done. :)

Newbie

Posts

Joined
Mon Jun 18, 2012 9:40 am

Post by tillieb » Tue Jul 31, 2012 3:29 pm

never mind... this is still not fixed.
I still receive the following errors and I don't know how to fix this.

Latest errors?

Code: Select all

2012-07-12 4:48:29 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-12 5:03:44 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-12 5:05:22 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-12 5:17:33 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-12 21:59:28 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-13 4:52:52 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-13 5:30:24 - PHP Notice:  Error: Got error -1 from storage engine<br />Error No: 1030<br />SELECT * FROM oc_information i LEFT JOIN oc_information_description id ON (i.information_id = id.information_id) LEFT JOIN oc_information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '1' AND i2s.store_id = '0' AND i.status = '1' ORDER BY i.sort_order, LCASE(id.title) ASC in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/system/database/mysql.php on line 49
2012-07-13 5:30:39 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-13 9:36:08 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-14 13:18:27 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-14 13:18:28 - PHP Notice:  Error: Got error 28 from storage engine<br />Error No: 1030<br />SELECT * FROM oc_information i LEFT JOIN oc_information_description id ON (i.information_id = id.information_id) LEFT JOIN oc_information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '1' AND i2s.store_id = '0' AND i.status = '1' ORDER BY i.sort_order, LCASE(id.title) ASC in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/system/database/mysql.php on line 49
2012-07-16 15:33:46 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-17 1:44:13 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-18 22:45:56 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-20 21:28:56 - PHP Notice:  Error: Got error -1 from storage engine<br />Error No: 1030<br />SELECT * FROM oc_information i LEFT JOIN oc_information_description id ON (i.information_id = id.information_id) LEFT JOIN oc_information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '1' AND i2s.store_id = '0' AND i.status = '1' ORDER BY i.sort_order, LCASE(id.title) ASC in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/system/database/mysql.php on line 49
2012-07-22 7:02:37 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-22 21:50:06 - PHP Notice:  Error: Got error -1 from storage engine<br />Error No: 1030<br />SELECT * FROM oc_product_option po LEFT JOIN `oc_option` o ON (po.option_id = o.option_id) LEFT JOIN oc_option_description od ON (o.option_id = od.option_id) WHERE po.product_id = '50' AND od.language_id = '1' ORDER BY o.sort_order in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/system/database/mysql.php on line 49
2012-07-23 20:34:38 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-28 23:09:33 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-30 0:15:41 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-30 0:29:36 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-30 0:29:37 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-30 0:32:14 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-30 0:34:58 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14
2012-07-30 13:13:53 - PHP Notice:  Undefined index:  banner_id in /hermes/bosweb/web094/b946/ipg.healingthroughillnes/storefront/catalog/controller/module/banner.php on line 14

Newbie

Posts

Joined
Mon Jun 18, 2012 9:40 am

Post by Avvici » Tue Jul 31, 2012 9:19 pm

I meant, try this:

Code: Select all

if($setting['banner_id']){
      $results = $this->model_design_banner->getBanner($setting['banner_id']);
      }else{
      $results = array();

      }

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by blademultimedia » Tue Sep 25, 2012 6:22 pm

Hi,

I have updated the file with the mods you have posted however I still seem to be receiving the same error on line 13

PHP Notice: Undefined index: banner_id in /home/***SITE USER***/public_html/catalog/controller/module/banner.php on line 13

Updated the /controller/module/banner.php file with:

if($setting['banner_id']){
$results = $this->model_design_banner->getBanner($setting['banner_id']);
}else{
$results = array();

}


Running Opencart v.1.5.4.1


Thanks in advance,

Regards

Karl.


Posts

Joined
Tue Sep 25, 2012 6:17 pm

Post by blademultimedia » Wed Sep 26, 2012 4:59 pm

Hi,

Can anyone shed any light on this please? I really need to get this error sorted as soon as possible. Any help will be much appreciated.

Thank you in advance,

Regards,

Karl.


Posts

Joined
Tue Sep 25, 2012 6:17 pm

Post by blademultimedia » Wed Sep 26, 2012 10:00 pm

Anyone out there that can assist on this one? Really need to get to the bottom of the error.


Posts

Joined
Tue Sep 25, 2012 6:17 pm

Post by Avvici » Wed Sep 26, 2012 10:51 pm

Try this:

Code: Select all

if(isset($setting['banner_id'])){
      $results = $this->model_design_banner->getBanner($setting['banner_id']);
      }else{
      $results = $this->model_design_banner->getBanner(0);

      }
If that doesn't fix the error then reinstall a fresh copy of 1.5.4.1

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by blademultimedia » Wed Sep 26, 2012 11:34 pm

Seems to have done the trick so far......... No further errors in the past 10 minutes.

Thanks very much for your help.


Karl.


Posts

Joined
Tue Sep 25, 2012 6:17 pm

Post by Avvici » Thu Sep 27, 2012 1:43 am

Point is, it's not really fixing the real problem but only getting you past the error. Perhaps it's intermittent with certain banners you have installed. Good luck.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by shadav » Wed Oct 24, 2012 6:20 am

i just installed for the first time....removed all demo products/banners/manufactures/ect and have this error as well

User avatar
Newbie

Posts

Joined
Wed Oct 24, 2012 1:12 am
Location - Westfield, IN

Post by mikexst » Wed Jul 16, 2014 8:20 pm

It's quite a while since the last post on this thread, but am wondering if there has been a definitive answer found to the issue. The problem has reared it's head for me just recently with vera 1.5.6.4

I have the standard slideshow installed on a new website I am building. I loaded some images into the banner module as a test for the slideshow. That appears to work fine, but I am getting a message over the website header saying:

"Notice: Undefined index: banner_id in /home4/rubberal/public_html/catalog/controller/module/banner.php on line 13"

in the php file, line 13 reads:

$results = $this->model_design_banner->getBanner($setting['banner_id']);

and continues:

foreach ($results as $result) {
if (file_exists(DIR_IMAGE . $result['image'])) {
$this->data['banners'][] = array(
'title' => $result['title'],
'link' => $result['link'],
'image' => $this->model_tool_image->resize($result['image'], $setting['width'], $setting['height'])
);
}
}

$this->data['module'] = $module++;

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

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

Any answers would be greatly appreciated - newbie here so needing all the help I can get!

Mike

Newbie

Posts

Joined
Wed Jul 16, 2014 8:06 pm
Who is online

Users browsing this forum: No registered users and 46 guests