2

I installed Magento 3rd party "Brands" extension update, prior to installation I disabled cache and right after installation my homepage is showing an error:

Error in file: "/home/directory/public_html/site/app/code/local/extension/brandsextension/sql/brandsextension_setup/mysql-2-1-1-2" - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'position_brand'

I tried deleting extension field from core_resource table, and reinstalled once again, however same error persists.

Any help ?

Icon
  • 911
  • 1
  • 10
  • 31
  • Can you post the contents of this file? /home/directory/public_html/site/app/code/local/extension/brandsextension/sql/brandsextension_setup/mysql-2-1-1-2 – espradley Nov 02 '15 at 21:43

1 Answers1

3

Can you post the contents of this file? /home/directory/public_html/site/app/code/local/extension/brandsextension/sql/brandsextension_setup/mysql-2-1-1-2?

Also -- it's possible the SQL already ran and it's trying to install it again. You could rename this file to .old and see if it lets you install it then, but I'd actually recommend you go with a different extension. If you are already having issues with this on on install, can't image it's going to be a great addition to your plugin family.

espradley
  • 2,138
  • 2
  • 17
  • 15
  • I will post as I get home... The thing is that I installed updated version, previous version was working fine... once I installed update the issue started. – Icon Nov 02 '15 at 21:48
  • Ah, in that case, yea, probably just need to remove the line in that file that is trying to create this column: position_brand. – espradley Nov 02 '15 at 21:50
  • ALTER TABLE {$this->getTable('brand')} ADD `position_brand` INT(11) NOT NULL AFTER `updated_time`; This is a line from a file. – Icon Nov 02 '15 at 21:55
  • Comment out that line and see if it works. It may move on to the next column it tries to create IF others are already there. Alternatively, if you haven't added any position data, you could remove the column from the table. – espradley Nov 02 '15 at 21:58
  • I commented out the whole line, and it does move to the 2nd one. – Icon Nov 02 '15 at 21:58
  • Once I comment 2nd one, it give me fatal error on front page. – Icon Nov 02 '15 at 21:59
  • I'd keep doing that until you got it to work. Tedious but the alternative would be to comment out the whole file, in which case you may end up missing an important column. – espradley Nov 02 '15 at 22:00
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/94029/discussion-between-espradley-and-icon). – espradley Nov 02 '15 at 22:00
  • Problem solved in chat -- turns out the developer didn't build the install scripts to be upgradable so renaming the install files fixed the issue. – espradley Nov 02 '15 at 22:28