Giter VIP home page Giter VIP logo

Comments (7)

Vinai avatar Vinai commented on June 12, 2024

Thank you for the report! This must be a different issue since the issue you mention is fixed in the Abstract GroupsCatalog2 Indexer class, so the fix applies to categories and products alike. Can you please post a full stack trace of the exception?

from groupscatalog2.

nrunde avatar nrunde commented on June 12, 2024
2012-10-22T08:01:12+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '64554-13-1' for key 'IDX_GROUPSCATALOG_PRODUCT_IDX_ENTITY_ID_GROUP_ID_STORE_ID'
Trace: #0 /srv/www/vhosts/domain.de/www/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /srv/www/vhosts/domain.de/www/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /srv/www/vhosts/domain.de/www/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /srv/www/vhosts/domain.de/www/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `gr...', Array)
#4 /srv/www/vhosts/domain.de/www/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `gr...', Array)
#5 /srv/www/vhosts/domain.de/www/lib/Varien/Db/Adapter/Pdo/Mysql.php(1953): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `gr...', Array)
#6 /srv/www/vhosts/domain.de/www/lib/Varien/Db/Adapter/Pdo/Mysql.php(1926): Varien_Db_Adapter_Pdo_Mysql->insertArray('groupscatalog_p...', Array, Array)
#7 /srv/www/vhosts/domain.de/www/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Indexer/Abstract.php(260): Varien_Db_Adapter_Pdo_Mysql->insertMultiple('groupscatalog_p...', Array)
#8 /srv/www/vhosts/domain.de/www/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Indexer/Abstract.php(187): Netzarbeiter_GroupsCatalog2_Model_Resource_Indexer_Abstract->_insertIndexRecords(Array)
#9 /srv/www/vhosts/domain.de/www/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Indexer/Abstract.php(150): Netzarbeiter_GroupsCatalog2_Model_Resource_Indexer_Abstract->_reindexEntity()
#10 /srv/www/vhosts/domain.de/www/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Netzarbeiter_GroupsCatalog2_Model_Resource_Indexer_Abstract->reindexAll()
#11 /srv/www/vhosts/domain.de/www/app/code/core/Mage/Index/Model/Process.php(207): Mage_Index_Model_Indexer_Abstract->reindexAll()
#12 /srv/www/vhosts/domain.de/www/app/code/core/Mage/Index/Model/Process.php(253): Mage_Index_Model_Process->reindexAll()
#13 /srv/www/vhosts/domain.de/www/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#14 /srv/www/vhosts/domain.de/www/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#15 /srv/www/vhosts/domain.de/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#16 /srv/www/vhosts/domain.de/www/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 /srv/www/vhosts/domain.de/www/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#18 /srv/www/vhosts/domain.de/www/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#19 /srv/www/vhosts/domain.de/www/index.php(80): Mage::run('', 'store')
#20 {main}

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

Does the exception only occur when you rebuild the whole GroupsCatalog2 products index, or does it also happen when you edit and save the product with the ID 64554 individually?

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

Also, can you please give me the output of the SQL query

SELECT `e`.`entity_id`, `a`.`value` AS `group_ids`, `a`.`store_id`
    FROM `catalog_product_entity` AS `e`
    LEFT JOIN `eav_attribute` AS `eav`
        ON `eav`.`entity_type_id`=`e`.`entity_type_id` 
        AND `eav`.`attribute_code`='groupscatalog2_groups'
    LEFT JOIN `catalog_product_entity_text` AS `a`
        ON `e`.`entity_id`=`a`.`entity_id`
        AND `a`.`attribute_id`=`eav`.`attribute_id`
    WHERE (`e`.`entity_id` IN ('64554')) ORDER BY `e`.`entity_id` ASC, `a`.`store_id` ASC;

from groupscatalog2.

nrunde avatar nrunde commented on June 12, 2024

If I edit the product itself there isn't a failure, but there's only the possibility to chose the customer groups once.
In the products grid you can see one or more customer group is associated twice or more to some products.
We ran a import script to get the products into database. But I don't get any multiple associated customer groups in my import dump, it always looks fine so far.
After every import there are different products with this problem. Sometimes only one, sometimes more than fifty products.

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

Thanks for the additional info. I just pushed a commit that should take care of the problem.
562fde2

Please let me know if that fixes the issue for you. Thanks!

from groupscatalog2.

nrunde avatar nrunde commented on June 12, 2024

After implementing your fix rebuilding indexes works. Thank you very much!

from groupscatalog2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.