cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling kills Magento

Compiling kills Magento

I've executed bin/magento setup:di:compile as part of the installation of an extension. After doing so, I cannot access the Admin Panel or the frontend.

 

I tried restoring the server and executing just the compile without installing the extension first. The result is the same, so the problem is not the extension. We have no extensions, themes or anything else installed. It's a fresh install of Magento. How is it that a compile breaks Magento? Can it be fixed, or does Magento just not work if you compile it?

 

EDIT: I just tried building a brand new Magento server. I was able to navigate to the store. I then executed a recompile and tried again. The store was not accessable. This is a brand new install. Absolutely nothing else installed, modified or configured. Seems pretty clear to me that compile simply doesn't work. I just don't understand how it is that so much in Magento doesn't work. I must have discovered a dozen ways now to kill Magento through the Admin Panel. I'm getting very tired of having to do server restores.

6 REPLIES 6

Re: Compiling kills Magento

Hi @Scorpio

 

Could you check system.log file and debug.log file under var/log directory? If some specific errors are there update your question with those errors.

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: Compiling kills Magento

How to diagnose Magento 2 errors: https://mage2.pro/t/307

Re: Compiling kills Magento

what happens if you run "magento cache:flush" from cli after "breaking" magento with the compile command?  also, how did you set up magnto?  one-click install? if so, which hosting company?

Re: Compiling kills Magento

I have the same issue.  Magento breaks after running compile.  I ran cache:flush after compile and nothing changed.  Here are the errors from the system log:

 

"'Magento_Catalog::js/components.phtml' in module: '' block's name: 'catalog_category_page_head_components' [] []
[2016-05-06 15:48:02] main.CRITICAL: Recoverable Error: Argument 1 passed to Magento\Customer\Model\AccountManagement::__construct() must be an instance of Magento\Customer\Model\CustomerFactory, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /chroot/home/faeriesd/xxx.com/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 97 and defined in /chroot/home/faeriesd/xxx.com/html/vendor/magento/module-customer/Model/AccountManagement.php on line 243 [] []
[2016-05-06 15:48:02] main.CRITICAL: Recoverable Error: Argument 1 passed to Magento\Customer\Model\AccountManagement::__construct() must be an instance of Magento\Customer\Model\CustomerFactory, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /chroot/home/faeriesd/xxx.com/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 97 and defined in /chroot/home/faeriesd/xxx.com/html/vendor/magento/module-customer/Model/AccountManagement.php on line 243 [] []
[2016-05-06 15:48:02] main.CRITICAL: Recoverable Error: Argument 1 passed to Magento\Customer\Model\AccountManagement::__construct() must be an instance of Magento\Customer\Model\CustomerFactory, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /chroot/home/faeriesd/xxx.com/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 97 and defined in /chroot/home/faeriesd/xxx.com/html/vendor/magento/module-customer/Model/AccountManagement.php on line 243 [] []
[2016-05-06 15:48:14] main.CRITICAL: Invalid template file: 'Magento_Catalog::js/components.phtml' in module: '' block's name: 'catalog_category_page_head_components' [] []"

Re: Compiling kills Magento

*Bump*

 

Did anyone figure this out? After running a compile command on my Magento install I am getting errors when I try to load the customer page in the back end or when accessing the front end.

Re: Compiling kills Magento

On my install, deleting the var/di and var/generation folders solved the issue.