title: Magento - Error while installing extension
body: <p>I have magento 1.6.2 and want to try to install a extension.</p>
  
  <p>But i get an error.</p>
  
  <p>I know it wants to add some extra attributes to my database.
  Because it says <code>Wrong attribute set ID</code> but i don't see any id's in the <code>mysql4-install-0.1.0.php</code> file. Am i missing somthing?</p>
  
  <p>This is the error on the page:</p>
  
  <pre><code>    Mage_Eav_Exception Object
  (
      [_messages:protected] =&gt; Array
          (
          )
  
      [message:protected] =&gt; Wrong attribute set ID
      [string:Exception:private] =&gt; 
      [code:protected] =&gt; 0
      [file:protected] =&gt; /path to magento/app/Mage.php
      [line:protected] =&gt; 549
      [trace:Exception:private] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [file] =&gt; /path to magento/app/code/core/Mage/Eav/Model/Entity/Setup.php
                      [line] =&gt; 318
                      [function] =&gt; exception
                      [class] =&gt; Mage
                      [type] =&gt; ::
                      [args] =&gt; Array
                          (
                              [0] =&gt; Mage_Eav
                              [1] =&gt; Wrong attribute set ID
                          )
  
                  )
  
              [1] =&gt; Array
                  (
                      [file] =&gt; /path to magento/app/code/core/Mage/Eav/Model/Entity/Setup.php
                      [line] =&gt; 426
                      [function] =&gt; getAttributeSetId
                      [class] =&gt; Mage_Eav_Model_Entity_Setup
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                              [0] =&gt; catalog_product
                              [1] =&gt; Default
                          )
  
                  )
  
              [2] =&gt; Array
                  (
                      [file] =&gt; /path to magento/path to mysql file/mysql4-install-0.1.0.php
                      [line] =&gt; 19
                      [function] =&gt; addAttributeGroup
                      [class] =&gt; Mage_Eav_Model_Entity_Setup
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                              [0] =&gt; catalog_product
                              [1] =&gt; Default
                              [2] =&gt; Video
                              [3] =&gt; 1000
                          )
  
                  )
  
              [3] =&gt; Array
                  (
                      [file] =&gt; /path to magento/app/code/core/Mage/Core/Model/Resource/Setup.php
                      [line] =&gt; 624
                      [args] =&gt; Array
                          (
                              [0] =&gt; /path to magento/path to mysql file/mysql4-install-0.1.0.php
                          )
  
                      [function] =&gt; include
                  )
  
              [4] =&gt; Array
                  (
                      [file] =&gt; /path to magento/app/code/core/Mage/Core/Model/Resource/Setup.php
                      [line] =&gt; 421
                      [function] =&gt; _modifyResourceDb
                      [class] =&gt; Mage_Core_Model_Resource_Setup
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                              [0] =&gt; install
                              [1] =&gt; 
                              [2] =&gt; 0.1.3
                          )
  
                  )
  
              [5] =&gt; Array
                  (
                      [file] =&gt; /path to magento/app/code/core/Mage/Core/Model/Resource/Setup.php
                      [line] =&gt; 327
                      [function] =&gt; _installResourceDb
                      [class] =&gt; Mage_Core_Model_Resource_Setup
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                              [0] =&gt; 0.1.3
                          )
  
                  )
  
              [6] =&gt; Array
                  (
                      [file] =&gt; /path to magento/app/code/core/Mage/Core/Model/Resource/Setup.php
                      [line] =&gt; 235
                      [function] =&gt; applyUpdates
                      [class] =&gt; Mage_Core_Model_Resource_Setup
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                          )
  
                  )
  
              [7] =&gt; Array
                  (
                      [file] =&gt; /path to magento/app/code/core/Mage/Core/Model/App.php
                      [line] =&gt; 412
                      [function] =&gt; applyAllUpdates
                      [class] =&gt; Mage_Core_Model_Resource_Setup
                      [type] =&gt; ::
                      [args] =&gt; Array
                          (
                          )
  
                  )
  
              [8] =&gt; Array
                  (
                      [file] =&gt; /path to magento/app/code/core/Mage/Core/Model/App.php
                      [line] =&gt; 338
                      [function] =&gt; _initModules
                      [class] =&gt; Mage_Core_Model_App
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                          )
  
                  )
  
              [9] =&gt; Array
                  (
                      [file] =&gt; /path to magento/app/Mage.php
                      [line] =&gt; 640
                      [function] =&gt; run
                      [class] =&gt; Mage_Core_Model_App
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                              [0] =&gt; Array
                                  (
                                      [scope_code] =&gt; 
                                      [scope_type] =&gt; store
                                      [options] =&gt; Array
                                          (
                                          )
  
                                  )
  
                          )
  
                  )
  
              [10] =&gt; Array
                  (
                      [file] =&gt; /path to magento/index.php
                      [line] =&gt; 80
                      [function] =&gt; run
                      [class] =&gt; Mage
                      [type] =&gt; ::
                      [args] =&gt; Array
                          (
                              [0] =&gt; 
                              [1] =&gt; store
                          )
  
                  )
  
          )
  
      [previous:Exception:private] =&gt; 
  )
  </code></pre>
  
  <p>And i also get a error repoort. This is the content of it:</p>
  
  <pre><code>a:5:{i:0;s:178:"Error in file: "/path to magento/path to mysql file/mysql4-install-0.1.0.php" - Wrong attribute set ID";i:1;s:1164:"#0 /path to magento/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
  #1 /path to magento/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup-&gt;_modifyResourceDb('install', '', '0.1.3')
  #2 /path to magento/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup-&gt;_installResourceDb('0.1.3')
  #3 /path to magento/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup-&gt;applyUpdates()
  #4 /path to magento/app/code/core/Mage/Core/Model/App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
  #5 /path to magento/app/code/core/Mage/Core/Model/App.php(338): Mage_Core_Model_App-&gt;_initModules()
  #6 /path to magento/app/Mage.php(640): Mage_Core_Model_App-&gt;run(Array)
  #7 /path to magento/index.php(80): Mage::run('', 'store')
  #8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
  </code></pre>
  
  <p>The problem file is <code>mysql4-install-0.1.0.php</code>
  Here is file:</p>
  
  <pre><code>&lt;?php
  /**
   * Created by JetBrains PhpStorm.
   * User: Alesioo
   * Date: 12.12.12
   * Time: 16:24
   * To change this template use File | Settings | File Templates.
   */ 
  /* @var $installer Mage_Core_Model_Resource_Setup */
  $installer = $this;
  $setup = new Mage_Eav_Model_Entity_Setup('core_setup');
  $installer-&gt;startSetup();
  
  /**
   * Adding Different Attributes
   */
  
  // adding attribute group
  $setup-&gt;addAttributeGroup('catalog_product', 'Default', 'Video', 1000);
  
  $setup-&gt;addAttribute('catalog_product', 'videobox', array(
      'group'         =&gt; 'Video',
      'input'         =&gt; 'textarea',
      'type'          =&gt; 'text',
      'label'         =&gt; 'Youtube video url',
      'backend'       =&gt; '',
      'visible'       =&gt; 1,
      'required'      =&gt; 0,
      'user_defined' =&gt; 1,
      'searchable' =&gt; 0,
      'filterable' =&gt; 0,
      'comparable'    =&gt; 0,
      'visible_on_front' =&gt; 1,
      'visible_in_advanced_search'  =&gt; 0,
      'is_html_allowed_on_front' =&gt; 0,
      'global'        =&gt; Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
  ));
  
  
  $setup-&gt;addAttribute('catalog_product', 'customtab', array(
      'group'         =&gt; 'Custom Tab',
      'input'         =&gt; 'textarea',
      'type'          =&gt; 'text',
      'label'         =&gt; 'Custom Tab',
      'backend'       =&gt; '',
      'visible'       =&gt; 1,
      'required'      =&gt; 0,
      'user_defined' =&gt; 1,
      'searchable' =&gt; 0,
      'filterable' =&gt; 0,
      'comparable'    =&gt; 0,
      'visible_on_front' =&gt; 1,
      'visible_in_advanced_search'  =&gt; 0,
      'is_html_allowed_on_front' =&gt; 0,
      'global'        =&gt; Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
  ));
  
  $setup-&gt;addAttribute('catalog_category', 'menutopdescription1', array(
      'group'         =&gt; 'General',
      'input'         =&gt; 'textarea',
      'type'          =&gt; 'text',
      'label'         =&gt; 'Topmenu description',
      'backend'       =&gt; '',
      'visible'       =&gt; 1,
      'required'      =&gt; 0,
      'is_wysiwyg_enabled' =&gt; 1,
      'visible_on_front' =&gt; 1,
      'note'=&gt;'Category description for top menu dropdown',
      'is_html_allowed_on_front' =&gt; 1,
      'global'        =&gt; Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
  ));
  
  $setup-&gt;addAttribute('customer', 'twitterid', array(
      'label'     =&gt; 'TwitterID',
      'type'      =&gt; 'varchar',
      'input'     =&gt; 'text',
      'visible'   =&gt; true,
      'required'  =&gt; 0,
      'position'  =&gt; 1,
  ));
  
  $eavConfig = Mage::getSingleton('eav/config');
  $attribute = $eavConfig-&gt;getAttribute('customer', 'twitterid');
  $attribute-&gt;save();
  
  $attribute_1 = $eavConfig-&gt;getAttribute('catalog_category', 'menutopdescription1');
  $attribute_1-&gt;setData('is_wysiwyg_enabled', 1);
  $attribute_1-&gt;save();
  
  $installer-&gt;endSetup();
  </code></pre>