Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Can’t add a new attribute (Reported bug #1764)
 
aurelien
Jr. Member
 
Total Posts:  7
Joined:  2007-12-28
 

Hello -

Since I’ve a Fedora install with Magento running well, I still want to run it on my Windows laptop…

I’ve a bug when I try to add a new Attribute in the application. This bug was already reported and is marked as “resolved” (http://www.magentocommerce.com/bug-tracking/issue?issue=963).

My config :
Magento 0.7.14800
Windows XP SP2
Apache 2.0.61 x86
mySQL 5.0.45
PHP 5.2.5

The output error :

Default English Store
exception 
'Zend_Db_Statement_Exception' with message 'SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)' in Z:\dev\workspace\myapp\www\lib\Zend\Db\Statement\Pdo.php:227
Stack trace
:
#0 Z:\dev\workspace\myapp\www\lib\Zend\Db\Statement.php(279): Zend_Db_Statement_Pdo->_execute(Array)
#1 Z:\dev\workspace\myapp\www\lib\Zend\Db\Adapter\Abstract.php(396): Zend_Db_Statement->execute(Array)
#2 Z:\dev\workspace\myapp\www\lib\Zend\Db\Adapter\Pdo\Abstract.php(206): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), Array)
#3 Z:\dev\workspace\myapp\www\lib\Zend\Db\Adapter\Abstract.php(693): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select), Array)
#4 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Model\Mysql4\Abstract.php(296): Zend_Db_Adapter_Abstract->fetchRow(Object(Zend_Db_Select))
#5 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Model\Mysql4\Translate\String.php(39): Mage_Core_Model_Mysql4_Abstract->load(Object(Mage_Core_Model_Translate_String), Array, NULL)
#6 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Model\Abstract.php(180): Mage_Core_Model_Mysql4_Translate_String->load(Object(Mage_Core_Model_Translate_String), Array, NULL)
#7 Z:\dev\workspace\myapp\www\app\code\core\Mage\Adminhtml\Block\Catalog\Product\Attribute\Edit\Tab\Options.php(114): Mage_Core_Model_Abstract->load(Array)
#8 Z:\dev\workspace\myapp\www\app\design\adminhtml\default\default\template\catalog\product\attribute\options.phtml(49): Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options->getLabelValues()
#9 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Template.php(118): include('Z:\dev\workspac...')
#10 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Template.php(144): Mage_Core_Block_Template->fetchView('adminhtml\defau...')
#11 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Template.php(189): Mage_Core_Block_Template->renderView()
#12 Z:\dev\workspace\myapp\www\app\code\core\Mage\Adminhtml\Block\Catalog\Product\Attribute\Edit\Tabs.php(64): Mage_Core_Block_Template->toHtml()
#13 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Template.php(181): Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tabs->_beforeToHtml()
#14 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Text\List.php(36): Mage_Core_Block_Template->toHtml()
#15 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Abstract.php(437): Mage_Core_Block_Text_List->toHtml()
#16 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Abstract.php(415): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#17 Z:\dev\workspace\myapp\www\app\design\adminhtml\default\default\template\page.phtml(111): Mage_Core_Block_Abstract->getChildHtml('left')
#18 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Template.php(118): include('Z:\dev\workspac...')
#19 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Template.php(144): Mage_Core_Block_Template->fetchView('adminhtml\defau...')
#20 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Block\Template.php(189): Mage_Core_Block_Template->renderView()
#21 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Model\Layout.php(417): Mage_Core_Block_Template->toHtml()
#22 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Controller\Varien\Action.php(309): Mage_Core_Model_Layout->getOutput()
#23 Z:\dev\workspace\myapp\www\app\code\core\Mage\Adminhtml\controllers\Catalog\Product\AttributeController.php(96): Mage_Core_Controller_Varien_Action->renderLayout()
#24 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Controller\Varien\Action.php(332): Mage_Adminhtml_Catalog_Product_AttributeController->editAction()
#25 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Controller\Varien\Router\Admin.php(136): Mage_Core_Controller_Varien_Action->dispatch('edit')
#26 Z:\dev\workspace\myapp\www\app\code\core\Mage\Core\Controller\Varien\Front.php(166): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#27 Z:\dev\workspace\myapp\www\app\Mage.php(411): Mage_Core_Controller_Varien_Front->dispatch()
#28 Z:\dev\workspace\myapp\www\index.php(29): Mage::run('base')
#29 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
aurelien
Jr. Member
 
Total Posts:  7
Joined:  2007-12-28
 

Hi again -

I’m still working on this bug and try to understand. Is there anybody of Magento team that can help a little by telling me how the bug #1764 was resolved?

My investigation shows me that the Exception occures when this sql statement is done:
INSERT INTO `core_translate` (`key_id`, `string`, `translate`) VALUES (?, ?, ?)
With values 0= ||| 1=Solid top ||| 2=Solid top

There is a foreign key FK_CORE_TRANSLATE_STORE on store_id and this value is missing in this query…

Any idea?…

Aurelien

 
Magento Community Magento Community
Magento Community
Magento Community
 
aurelien
Jr. Member
 
Total Posts:  7
Joined:  2007-12-28
 

I continue to speak to myself… I’ve installed Xampp and this error doesn’t appear…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top