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

Varien_Autoload fails to open CustomerActivation/Model/Resource/Attribute/Source/Customeractivation.php #74

Open markjameslyons opened 9 years ago

markjameslyons commented 9 years ago

Hi, I downloaded the source and installed manually, cleared all caches, logged out of admin and then back in.

I can access the System -> Configuration -> Customer Configuration -> Customer Activation menu and set it up as I would like it. But when I go to the admin panel for Customers -> Manage Customers, clicking to Edit or Add New customer I get the following error:

Warning: include(Netzarbeiter/CustomerActivation/Model/Resource/Attribute/Source/Customeractivation.php) [function.include]: failed to open stream: No such file or directory  in /Applications/MAMP/htdocs/mysite/store/lib/Varien/Autoload.php on line 94

#0 /Applications/MAMP/htdocs/mysite/store/lib/Varien/Autoload.php(94): mageCoreErrorHandler(2, 'include(Netzarb...', '/Applications/M...', 94, Array)
#1 /Applications/MAMP/htdocs/mysite/store/lib/Varien/Autoload.php(94): Varien_Autoload::autoload()
#2 [internal function]: Varien_Autoload->autoload('Netzarbeiter_Cu...')
#3 [internal function]: spl_autoload_call('Netzarbeiter_Cu...')
#4 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Model/Config.php(1346): class_exists('Netzarbeiter_Cu...')
#5 /Applications/MAMP/htdocs/mysite/store/app/Mage.php(463): Mage_Core_Model_Config->getModelInstance('customeractivat...', Array)
#6 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(383): Mage::getModel('customeractivat...')
#7 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
#8 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php(75): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset), Array)
#9 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php(58): Mage_Adminhtml_Block_Customer_Edit_Tab_Account->initForm()
#10 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Adminhtml_Block_Customer_Edit_Tabs->_beforeToHtml()
#11 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#12 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#13 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#14 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#15 /Applications/MAMP/htdocs/mysite/store/app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml('left')
#16 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Block/Template.php(241): include('/Applications/M...')
#17 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#18 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#19 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#20 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#21 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#22 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#23 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Adminhtml/controllers/CustomerController.php(151): Mage_Core_Controller_Varien_Action->renderLayout()
#24 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_CustomerController->editAction()
#25 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#26 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#27 /Applications/MAMP/htdocs/mysite/store/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#28 /Applications/MAMP/htdocs/mysite/store/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#29 /Applications/MAMP/htdocs/mysite/store/index.php(89): Mage::run('', 'store')
#30 {main}

From the store frontend I am able to sign up a new customer and I can see them in the Customers->Manage Customers list (Customer Activated = yes).

I am using Magento Community 1.9.1.0

Hope you can help, Cheers.

markjameslyons commented 9 years ago

This only seems to be happening on my local environment. I uploaded to my server and it all works fine.

The file requested doesn't actually exist in the file structure. Can you point me towards any reading where I can find out more about this routing?

Cheers

Vinai commented 9 years ago

The error means the file doesn't exist or isn't readable by the webserver/php. The full path to the file inside Magento is

app/code/community/Netzarbeiter/CustomerActivation/Model/Resource/Attribute/Source/Customeractivation.php

Also, check the upper/lower case of all the folders and the file.

markjameslyons commented 9 years ago

That file just does not exist. I only have

app/code/community/Netzarbeiter/CustomerActivation/Model/Resource/Customer.php

No Resource folder.

Yet, it is working on my live server, just not on my local MAMP installation.

Vinai commented 9 years ago

There is no way the module could work on the live server without that file :) To fix it, please add the file. For example, you can get it from the repository.

markjameslyons commented 9 years ago

Ah sorry, there is no Attribute folder inside of the Resource folder I meant.

https://github.com/Vinai/customer-activation/tree/master/app/code/community/Netzarbeiter/CustomerActivation/Model/Resource

This contains just Customer.php. should I not see an Attribute folder there? And then inside of that there would be the source folder which contains Customeractivation.php?

Vinai commented 9 years ago

Correct!

Vinai commented 9 years ago

You can see the structure it needs to have in the github source repository. Please pay attention to upper/lower case of the folder and file names. It is critical that is exactly like in the repository.

kaspart commented 9 years ago

I am also getting this error. I cannot edit a customer. I downloaded this extension in several ways and I am not getting the file mentioned above: app/code/community/Netzarbeiter/CustomerActivation/Model/Resource/Attribute/Source/Customeractivation.php

There is no Attribute folder inside Resource. Please provide. Thanks!

kaspart commented 9 years ago

markjameslyons: did you get this to work? I have downloaded at least 4 different versions and do not see that path in any of them.

Vinai commented 9 years ago

My only guess is you are using an old version of the extension. How exactly did you download it? Did you use the ZIP download button on the repository homepage pointing to https://github.com/Vinai/customer-activation/archive/master.zip ?

viskar4u commented 7 years ago

I'm not sure if anyone have manage to resolve this issue. I have downloaded --> https://github.com/Vinai/customer-activation/archive/master.zip but

I can only see 👍 app/code/community/Netzarbeiter/CustomerActivation/Model/Resource/Attribute/Customer.php

But, this is not available app/code/community/Netzarbeiter/CustomerActivation/Model/Resource/Attribute/Source/Customeractivation.php

Appreciate if anyone can provide feedback on resolving this.