0

I've created my custom extension and tried to install it. Now I get the following error:

PHP Fatal error: Class 'My\Module\Block\Customer\Form\Register' not found in /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 117, referer: http://192.168.56.101/magento2/

I tried to recompile the di, upgrade with setup command, clean cache, but nothing works.

How can I fix it?

  • you clear the generation folder in var? – Shaheer Ali Jan 27 '16 at 7:22
  • Yes. I recompiled di and the generation folder was regenerated but it doesn't work. – ClassMP Jan 27 '16 at 7:44
  • you checked that your block file is exists My\Module\Block\Customer\Form\Register – Shaheer Ali Jan 27 '16 at 7:55
  • Yes. The curious thing is that it is working correctly on my Win Xampp installation. After trying on my new CentOS dev environment it doesn't work. I think it could correlate with the permissions... – ClassMP Jan 27 '16 at 8:22
  • Make sure you have the case correct. I.e. Register, not register. – Smartie Jan 27 '16 at 8:49
3

Make sure you have the case correct. I.e. Register, not register. – Smartie

Thanks Smartie the issue was the wrong case for my module. I created folders with lower case and used upper case in code. ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.