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?

5
  • you clear the generation folder in var? Commented Jan 27, 2016 at 7:22
  • Yes. I recompiled di and the generation folder was regenerated but it doesn't work. Commented Jan 27, 2016 at 7:44
  • you checked that your block file is exists My\Module\Block\Customer\Form\Register Commented Jan 27, 2016 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... Commented Jan 27, 2016 at 8:22
  • Make sure you have the case correct. I.e. Register, not register. Commented Jan 27, 2016 at 8:49

1 Answer 1

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 and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.