Page 1 of 1

Error Message When Adding Banners

Posted: Wed Mar 09, 2016 11:05 am
by pipoy
When I add a banner to my live website, I get this error message

Notice: Undefined index: sort_order in x/admin/model/design/banner.php on line 37Warning: Cannot modify header information - headers already sent by (output started at x/admin/index.php:84) in x/system/library/response.php on line 12

It is however added on the list when I hit back.. Same as adding pictures to existing banners.

Whole purpose of adding banners is successful. But that error message shows and I dont know what it wants me to know.

This happens to my live site.
but no error in localhost. Which is a complete clone except the config.php

Thanks

Re: Error Message When Adding Banners

Posted: Wed Mar 09, 2016 2:17 pm
by magikcommerce
Go to file admin/view/template/design/banner_form.tpl in function addImage()

Find code

Code: Select all

html += '  <td class="text-right" style="width: 10%;><input type="text" name="banner_image[' + image_row + '][sort_order]" value="" placeholder="<?php echo $entry_sort_order; ?>" class="form-control" /></td>';
Replace code

Code: Select all

html += '  <td class="text-right" style="width: 10%;"><input type="text" name="banner_image[' + image_row + '][sort_order]" value="" placeholder="<?php echo $entry_sort_order; ?>" class="form-control" /></td>';

Re: Error Message When Adding Banners

Posted: Wed Mar 09, 2016 3:49 pm
by pipoy
Wow that worked wonderfully.

Im amazed how you knew.
Is this a known issue? because if it is, I need to document this one

Re: Error Message When Adding Banners

Posted: Fri Mar 18, 2016 6:31 pm
by Randem
Hi pipoy,

Here are a few things that are documented - http://forum.opencart.com/viewtopic.php?f=190&t=157955