Vinai / groupscatalog2

Magento extension to enable you to hide categories and products from customers depending on their customer group. This is a Magento 1.6 and newer compatible version of the Netzarbeiter Customer Groups Catalog extension.
139 stars 60 forks source link

Issue when indexing data #72

Closed processthud closed 10 years ago

processthud commented 10 years ago

I can't seem to get the GroupsCatalog Products and GroupsCatalog Categories to reindex. When I try to reindex them I get

a:5:{i:0;s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";i:1;s:3134:"#0 /home/techspec/public_html/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/techspec/public_html/magento/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/techspec/public_html/magento/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/techspec/public_html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `core_fl...', Array)
#4 /home/techspec/public_html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `core_fl...', Array)
#5 /home/techspec/public_html/magento/lib/Zend/Db/Adapter/Abstract.php(753): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/techspec/public_html/magento/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(380): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
#7 /home/techspec/public_html/magento/app/code/core/Mage/Core/Model/Abstract.php(225): Mage_Core_Model_Resource_Db_Abstract->load(Object(Mage_Core_Model_File_Storage_Flag), 'synchronize', 'flag_code')
#8 /home/techspec/public_html/magento/app/code/core/Mage/Core/Model/Flag.php(119): Mage_Core_Model_Abstract->load('synchronize', 'flag_code')
#9 /home/techspec/public_html/magento/app/code/core/Mage/Core/Model/File/Storage.php(83): Mage_Core_Model_Flag->loadSelf()
#10 /home/techspec/public_html/magento/app/code/core/Mage/Core/Model/Observer.php(61): Mage_Core_Model_File_Storage->getSyncFlag()
#11 /home/techspec/public_html/magento/app/code/core/Mage/Core/Model/App.php(1338): Mage_Core_Model_Observer->addSynchronizeNotification(Object(Varien_Event_Observer))
#12 /home/techspec/public_html/magento/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Core_Model_Observer), 'addSynchronizeN...', Object(Varien_Event_Observer))
#13 /home/techspec/public_html/magento/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#14 /home/techspec/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(530): Mage::dispatchEvent('controller_acti...', Array)
#15 /home/techspec/public_html/magento/app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#16 /home/techspec/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(408): Mage_Adminhtml_Controller_Action->preDispatch()
#17 /home/techspec/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#18 /home/techspec/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/techspec/public_html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/techspec/public_html/magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#21 /home/techspec/public_html/magento/index.php(87): Mage::run('default')
#22 {main}";s:3:"url";s:90:"/magento/index.php/admin/catalog_product/edit/id/525/key/786de1a2a975d29b5194de31f526bb3c/";s:11:"script_name";s:18:"/magento/index.php";s:4:"skin";s:5:"admin";}

I disabled my compiler prior to installing, installed the module, flushed the cahce, went into settings and disabled the module(it was enabled once installed, I couldn't get it to not flag an error during recompiling without first disabling it), recompiled, and then re-enabled the module. Now I am trying to reindex and set specific products to be viewable by specific groups but once enabled it hides all of my products and categories.

Vinai commented 10 years ago

Unless the indexing runs successfully, all products and categories will be hidden.

Which versions of

are you using?

processthud commented 10 years ago

Magento version 1.7.0.2

Extension version 0.3.2

MySQL version 5.0.96-community

PHP Version 5.2.17

Vinai commented 10 years ago

I'm unable to test with such an old PHP or MySQL version. Could you please try to enable SQL logging right before you click reindex in the backend? It is important that it is only enabled for the current request, not for all visitors, otherwise the log will contain too much information to be useful. To enable SQL logging, first navigate to the reindex page in the admin area. Then open the file lib/Varien/Db/Adapter/Pdo/Mysql.php, and change the line

protected $_debug               = false;

to

protected $_debug               = true;

Also, change the line

protected $_logAllQueries       = false;

to

protected $_logAllQueries       = true;

Then save the file and click reindex in the Magento admin. After you have clicked in the backend you can immediately revert the changes in the Mysql.php file again, to turn of SQL logging.

The result can be found in the file var/debug/pdo_mysql.log

Please post the last query that was logged. Thanks.

Vinai commented 10 years ago

Closing this issue since there has been no response from the original poster since 3 months..