2

When i run command for indexing

php bin/magento indexer:info

Error was thrown

Class Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory does not exist

[Magento\Framework\Exception\LocalizedException] Can't create directory /var/www/html/var/generation/Magento/Indexer/Model/R
esourceModel/Indexer/State/.

I'm using magento 2.0.4, Linux server

  • 3
    give permissions to var /generation directory – Siva Kumar Koduru Dec 21 '17 at 5:41
  • wow , thanks it works. sudo chmod -R 777 /var/www/html/var/generation/ – Ganesh Dec 21 '17 at 5:51
1

My www.test.com website on Ubunto 16.04 and nginx in the admin page had an error

Class Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory does not exist

Turned out the folder /var/www/test.com/html/magento/generated/code/Magento/Indexer was owned by root and everything from there to /var/www/test.com/html/magento/generated/code/Magento/Indexer/Model/Indexer/CollectionFactory.php

fixed by changing owner to www-data like all the folders should have been:-

sudo chown -R www-data:www-data /var/www/test.com/html/magento/generated
0

In admin side I am getting

Class Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory does not exist

so I tried

sudo php chown -R www-data:www-data my_magento2_folder/*

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.