Page 4 of 5
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 6:55 pm
by AvanOsch
Aaaah, hold on!
I think I caught my mistake...
I'm guessing you don't have any banners currently setup?
Without any banners, the script won't detect that the database hasn't changed yet...
I'll fix this a.s.a.p.
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 8:01 pm
by AvanOsch
Thanks for the bug report, guys.
Just released a new version, with an extra installation instruction.
That should fix the problem.
Enjoy.
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 9:15 pm
by 741852963
I imagine how irritating it's for you but this error is persistent
Code: Select all
Notice: Error: Unknown colum 'link' in field list
Error No: 1054
INSERT INTO oc_banner_image_description SET banner_image_id = '1', language_id = '2', banner_id = '1', title = 'some title here', link = 'http://www.some-url.com', image = 'data/banner/b.jpg' in /*/public_html/system/database/mysql.php on line 49
If you want to retrace the steps to see if you can recreate the error:
Open cart 1.5.4.1 version
extensions installed:
- Aceshop_Remove_header_links.xml
BannerLanguage.xml
cache_manager.xml
dbassa_catalog_categories_to_information_pages.xml
Grid-View-By-Default-pmb-web-solutions.xml
hide_show_compare_or_wishlist.xml
news.xml
product_category_noemptymsg.xml
remove_returns_links.xml
remove-add-to-cart-if-out-of-stock.xml
quite some but I believe none are conflicting
1.) remove old BannerLanguage.xml
2.) drop oc_banner table
3.) drop oc_banner_image table
4.) drop oc_banner_image_description table
5.) execute following SQL querries:
Code: Select all
CREATE TABLE `oc_banner` (
`banner_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`status` tinyint(1) NOT NULL,
PRIMARY KEY (`banner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Code: Select all
CREATE TABLE `oc_banner_image` (
`banner_image_id` int(11) NOT NULL AUTO_INCREMENT,
`banner_id` int(11) NOT NULL,
`link` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
PRIMARY KEY (`banner_image_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Code: Select all
CREATE TABLE `oc_banner_image_description` (
`banner_image_id` int(11) NOT NULL,
`language_id` int(11) NOT NULL,
`banner_id` int(11) NOT NULL,
`title` varchar(64) NOT NULL,
PRIMARY KEY (`banner_image_id`,`language_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
6.) Copy new version of BannerLanguage.xml
7.) Create new banner
8.) Add banners
9.) Save banners and get error
I will try it again with default banners and report in a while (default banners as in following querries):
Code: Select all
INSERT INTO `oc_banner_image` (`banner_image_id`, `banner_id`, `link`, `image`) VALUES
(54, 7, 'index.php?route=product/product&path=57&product_id=49', 'data/demo/samsung_banner.jpg'),
(77, 6, 'index.php?route=product/manufacturer/info&manufacturer_id=7', 'data/demo/hp_banner.jpg'),
(75, 8, 'index.php?route=product/manufacturer/info&manufacturer_id=5', 'data/demo/htc_logo.jpg'),
(73, 8, 'index.php?route=product/manufacturer/info&manufacturer_id=8', 'data/demo/apple_logo.jpg'),
(74, 8, 'index.php?route=product/manufacturer/info&manufacturer_id=9', 'data/demo/canon_logo.jpg'),
(71, 8, 'index.php?route=product/manufacturer/info&manufacturer_id=10', 'data/demo/sony_logo.jpg'),
(72, 8, 'index.php?route=product/manufacturer/info&manufacturer_id=6', 'data/demo/palm_logo.jpg'),
(76, 8, 'index.php?route=product/manufacturer/info&manufacturer_id=7', 'data/demo/hp_logo.jpg');
Code: Select all
INSERT INTO `oc_banner_image_description` (`banner_image_id`, `language_id`, `banner_id`, `title`) VALUES
(54, 1, 7, 'Samsung Tab 10.1'),
(77, 1, 6, 'HP Banner'),
(75, 1, 8, 'HTC'),
(74, 1, 8, 'Canon'),
(73, 1, 8, 'Apple'),
(72, 1, 8, 'Palm'),
(71, 1, 8, 'Sony'),
(76, 1, 8, 'Hewlett-Packard');
Code: Select all
INSERT INTO `oc_banner` (`banner_id`, `name`, `status`) VALUES
(6, 'HP Products', 1),
(7, 'Samsung Tab', 1),
(8, 'Manufacturers', 1);
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 9:19 pm
by AvanOsch
No, No!!!
There's an extra installation step for the new version!!!
This is all that you should have to do: (no need to run any sql manually)
Upload the new version XML
After copying the new XML, go to the banner listing (System->design->banners)
and add "&install" to the url.
-EDIT-
Installing the "default" banners would also do the trick...
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 9:29 pm
by 741852963
Well installing default banners didn't made the trick
Code: Select all
Notice: Error: Table 'oc_banner_image_description' already exists
Error No: 1050
CREATE TABLE oc_banner_image_description (`banner_image_id` int(11) NOT NULL,`language_id` int(11) NOT NULL, `banner_id` int(11) NOT NULL, `title` varchar(64) COLLATE utf8_bin NOT NULL, PRIMARY KEY (`banner_image_id`,`language_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin in /*/public_html/system/database/mysql.php on line 49
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 9:33 pm
by AvanOsch
.....
I don't get that...
After reloading the page, does everything work?
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 9:40 pm
by 741852963
Excuse me I have to clarify. Above message displays when I have default banners and add '&install' to url
If I have default banners and don't add '&install'to url I get 'Notice: Error: Unknown colum 'link' in field list'
After reloading the page there is still the error message. After hitting back there is banner added however I can't edit it because I get error message about 'oc_banner_image_description' already existing.
Also I've removed all other mods
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 9:47 pm
by AvanOsch
Ok, I think I get it now...
The script checks for the table "banner_image_description", and can't find it in your case.
My mistake (again

)
I forgot to include the Database prefix when checking for the table...
Could you please try the following To fix:
Edit BannerLanguage.xml and FIND line 92:
Code: Select all
if (!in_array('banner_image_description', $Fields)) {
Then REPLACE WITH:
Code: Select all
if (!in_array(DB_PREFIX . 'banner_image_description', $Fields)) {
I'll update the extension AFTER we tracked down any more mistakes...
-EDIT-
No need to disable other vQMods...
You were right. They're probably not conflicting.
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 9:53 pm
by 741852963
I'll check it but before I have found way to get it working. I don't understand why but it works.
I drop all banner tables and then add oc_banner and oc_banner_image BUT NOT oc_banner_image_description
Than I go to admin/banners and perform instalation and it go all smoothly.
I'll check your fix shortly
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 9:59 pm
by AvanOsch
Excellent!
I do understand:
The adding of that table is a fix for a previous version. (in that version, the table was removed)
The script checks if it is missing first, adds it, and then continues to update the rest of the tables.
In your case, the script always thought the table was missing (when it wasn't), and tried to add it again.
Because you removed the table first, the script could complete correctly and install everything.
However, if you now add "&install" to the url, you'll get an error again.
This doesn't happen with the fix.
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 10:01 pm
by 741852963
Yep, altering line 92, does the trick.
Thanks for the great extension and support.
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 10:05 pm
by AvanOsch
Great!
Thanks for tracking down the bug!
Released the Update (silently).
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 10:17 pm
by 741852963
Haha, you'll hate me
I've encountered weird behavior.
When I set banner in admin I have them in certain order 'a', 'b', 'c'. When I save them and later try to edit the order is reversed (in display as well as in admin).
I'm not sure if it's extension fault or not I'll investigate it.
Edit: Yep it persists. However it's not mod breaking. Create banners -> save -> get them reversed -> edit (making no changes) -> have them reversed again, now in proper order. ;-)
Re: [Extension] Banner Language
Posted: Mon Mar 04, 2013 11:48 pm
by AvanOsch
That's not the extension's fault.
That is default OpenCart behaviour.
It sorts the entries by insert-order.
I do think you have a point, and it should be ordered by title.
That's why I released a new version (1.4) with sorting by title (in Default Admin language)
Enjoy!
Re: [Extension] Banner Language
Posted: Wed Mar 06, 2013 2:01 pm
by muraqib
AvanOsch wrote:Hi Muraqib,
That's strange...
Seems the database changes didn't go through...
Do you have any other extensions installed?
Are you using vQMod?
Yes I am using vQMod and I also used the manual installation and in both cases it throws the same error.
I do not have any other extensions regarding the banners and back-end.
Re: [Extension] Banner Language
Posted: Wed Mar 06, 2013 9:40 pm
by AvanOsch
Muraqib,
Did you try the new version?
I've released 2 versions in the meantime...
Re: [Extension] Banner Language
Posted: Fri Mar 08, 2013 2:06 pm
by muraqib
AvanOsch wrote:Muraqib,
Did you try the new version?
I've released 2 versions in the meantime...
Hi, Yes, I just tried the version 1.4 and it still throws the same error when I try to save the banner.
Please see the error in the attachment file.
This time I used only the vqmod as with the earlier version, there was no difference whether I used vqmod or manual installation - the error was the same.
Yet, when I delete the vqmod file of the banner language, the default banner works flawlessly.
Thank you in advance!
Re: [Extension] Banner Language
Posted: Fri Mar 08, 2013 9:03 pm
by AvanOsch
All problems should be solved...
Did you read/follow the installation instructions?
(especially, did you add the "&install" to the URL?)
Re: [Extension] Banner Language
Posted: Mon Mar 11, 2013 1:47 pm
by muraqib
Thank you!
Problem is solved!
I added the "&install" incorrectly before.
Thank you very much for the great support you've been giving here!
AvanOsch wrote:All problems should be solved...
Did you read/follow the installation instructions?
(especially, did you add the "&install" to the URL?)
Re: [Extension] Banner Language
Posted: Mon Mar 11, 2013 7:30 pm
by AvanOsch
Thanks for your reply!
Doing my best
