Vinai / customer-activation

Magento extension which makes it impossible for a customer to log in until the account has been activated by the administrator.
120 stars 59 forks source link

Installing this extension blocks my admin #35

Closed chndr closed 10 years ago

chndr commented 10 years ago

Hi,

I have tried to install the extension but after installing I cannot acces my backend.

I get the following massage: Exception printing is disabled by default for security reasons. Error log record number: 148721409918

Can you tell me what I do wrong? Thanks

Vinai commented 10 years ago

Please turn on the Magento developer mode to see the full error message, or look into the var/reports directory for a file called 148721409918 and paste its contents here. Thanks.

chndr commented 10 years ago

Hi,

Here is the full error meassage:

a:5:{i:0;s:73:"Mage registry key "_singleton/customeractivation/observer" already exists";i:1;s:2584:"#0 /www/j/e/n/mysite.com/public_html/app/Mage.php(222): Mage::throwException('Mage registry k...')
#1 /www/j/e/n/mysite.com/public_html/app/Mage.php(476): Mage::register('_singleton/cust...', false)
#2 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(21330): Mage::getSingleton('customeractivat...')
#3 /www/j/e/n/mysite.com/public_html/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('core_block_abst...', Array)
#4 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(1917): Mage::dispatchEvent('core_block_abst...', Array)
#5 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(27605): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#6 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(27621): Mage_Core_Model_Layout->createBlock('adminhtml/page_...', 'head')
#7 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(27388): Mage_Core_Model_Layout->addBlock('adminhtml/page_...', 'head')
#8 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(27354): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#9 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(27355): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#10 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(13798): Mage_Core_Model_Layout->generateBlocks()
#11 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(13723): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#12 /www/j/e/n/mysite.com/public_html/includes/src/Mage_Adminhtml_Controller_Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#13 /www/j/e/n/mysite.com/public_html/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(95): Mage_Adminhtml_Controller_Action->loadLayout()
#14 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(13872): Mage_Adminhtml_System_ConfigController->editAction()
#15 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(18234): Mage_Core_Controller_Varien_Action->dispatch('edit')
#16 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(17768): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(20368): Mage_Core_Controller_Varien_Front->dispatch()
#18 /www/j/e/n/mysite.com/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#19 /www/j/e/n/mysite.com/public_html/index.php(87): Mage::run('', 'store')
#20 {main}";s:3:"url";s:93:"/index.php/beheer/system_config/edit/section/newsletter/key/c3ded058c3a3980dc9c5c486abb9472e/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
Vinai commented 10 years ago

Please clear all browser cookies for the site and try again.

chndr commented 10 years ago

Thanks for your answer. I have cleared all browser cookies but still get an error. The only way to get on the site is to uninstall the extension from magento connect.

chndr commented 10 years ago

Before I miss something.. I cleared all the cookies from my browser. I use Google Chrome and IE 11 and cleared all the cookies and cache files from the beginning or do clear something from the backend of my magento before install this extension? My cache is off..

Vinai commented 10 years ago

Hm, that error happens very rarely, and I wasn't able to trigger it on purpose so far. The problem is that the error can't usually happen while tracing through the code, at least not as long as Magento isn't multi-threaded (which it isn't).

Clearing the cookies so the sessions are restarted usually fixes the issue.

The following change would fix it for sure, even if I don't understand the real reason why it is happening:

  1. Open the file app/code/community/Netzarbeiter/CustomerActivation/etc/config.xml
  2. Replace all occurences of singleton with model
  3. Save the file and clear the Magento cache

After that the problem should be gone.

chndr commented 10 years ago

oke thanks. Now I have acces to my backend again. I go look further if everything works as it should be. Thanks again!

chndr commented 10 years ago

Oke, I have another problem.

When I go admin>system>configuration>customer>customer configuration, then I get a blank page. I also dont see an option Customer Activation..

Vinai commented 10 years ago

Turn on the Magento developer mode to see the error message. It might simply be the ACL not being refreshed on the session. To fix that please log out of the admin and log back in again, and try again.

chndr commented 10 years ago

I am sorry but I am a newby with magento. Wich one do I have to turn on at Megento Developer, the Debugging Profiler or Log-settings?

Vinai commented 10 years ago

Neither of those.
The "right" way to enable it is by setting the environment variable MAGE_IS_DEVELOPER_MODE in the webserver configuration.
The quick-n-dirty way to enable it is by editing the index.php file in the Magento base directory, so that the condition checking for the environment variable is removed:

//if (true || isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
//}

If you do it that way be sure to remove the hack once you have the information you want.

chndr commented 10 years ago

Okay, I have done that. Know the Customer Configuration Tab that is blank gives now the follwing error:

Warning: include(/www/j/e/n/mysite.com/public_html/includes/src/Netzarbeiter_CustomerActivation_Model_Observer.php): failed to open stream: No such file or directory in /www/j/e/n/mysite.com/public_html/includes/src/Varien_Autoload.php on line 93

0 /www/j/e/n/mysite.com/public_html/includes/src/Varien_Autoload.php(93): mageCoreErrorHandler(2, 'include(/www/j/...', '/www/j/e/n/mys...', 93, Array)

1 /www/j/e/n/mysite.com/public_html/includes/src/Varien_Autoload.php(93): Varien_Autoload::autoload()

2 [internal function]: Varien_Autoload->autoload('Netzarbeiter_Cu...')

3 [internal function]: spl_autoload_call('Netzarbeiter_Cu...')

4 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(23742): class_exists('Netzarbeiter_Cu...')

5 /www/j/e/n/mysite.com/public_html/app/Mage.php(462): Mage_Core_Model_Config->getModelInstance('customeractivat...', Array)

6 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(21324): Mage::getModel('customeractivat...')

7 /www/j/e/n/mysite.com/public_html/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('core_block_abst...', Array)

8 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(1917): Mage::dispatchEvent('core_block_abst...', Array)

9 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(27605): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))

10 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(27621): Mage_Core_Model_Layout->createBlock('adminhtml/page', 'root')

11 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(27388): Mage_Core_Model_Layout->addBlock('adminhtml/page', 'root')

12 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(27354): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))

13 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(13798): Mage_Core_Model_Layout->generateBlocks()

14 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(13723): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()

15 /www/j/e/n/mysite.com/public_html/includes/src/Mage_Adminhtml_Controller_Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)

16 /www/j/e/n/mysite.com/public_html/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(95): Mage_Adminhtml_Controller_Action->loadLayout()

17 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(13872): Mage_Adminhtml_System_ConfigController->editAction()

18 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(18234): Mage_Core_Controller_Varien_Action->dispatch('edit')

19 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(17768): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

20 /www/j/e/n/mysite.com/public_html/includes/src/__default.php(20368): Mage_Core_Controller_Varien_Front->dispatch()

21 /www/j/e/n/mysite.com/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)

22 /www/j/e/n/mysite.com/public_html/index.php(87): Mage::run('', 'store')

23 {main}

Vinai commented 10 years ago

Okay, the issue is you have enabled the compiler but have not recompiled after installing the extension. Every time new extensions are installed you have to reinstall, or parts wil break.