0

Installed extension vsourz-html-sitemap And executed

php -dmemory_limit=5G bin/magento setup:upgrade

I am getting this strange issue .

            Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Model\ResourceModel\Product\Collection::getEntityPkName() must be an instance of Magento\Eav\Model\Entity\AbstractEntity, instance of Magento\Catalog\Model\ResourceModel\Product\Flat given, called in /home/pocketgrocery/public_html/vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php on line 1369 and defined in /home/pocketgrocery/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php:1532 Stack trace: #0 /home/pocketgrocery/public_html/vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php(1369): Magento\Catalog\Model\ResourceModel\Product\Collection->getEntityPkName(Object(Magento\Catalog\Model\ResourceModel\Product\Flat)) #1 /home/pocketgrocery/public_html/vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php(1476): Magento\Eav\Model\Entity\Collection\AbstractCollection->_addAttributeJoin('status', 'inner') #2 /home/pocketgrocery/public_html/vendor/magento/module-c in /home/pocketgrocery/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php on line 1532

Even compiled and cleaned the cache.

  • run upgrade as php bin/magento setup:upgrade not php -dmemory_limit=5G bin/magento setup:upgrade – Jai Jul 18 '17 at 12:40
  • it display error if I do not added -dmemory_limit=5G in command. – Peter Jul 18 '17 at 13:10
0

Check the Magento (2.0 / 2.1) version and if your extension is compatible with, this error occurs on the setup:upgrade execution ?

EDIT:

Run these commands on the root :

    1. php bin/magento setup:upgrade;
    1. php bin/magento setup:di:compile;
    1. php bin/magento setup:static-content:deploy
    1. php bin/magento cache:flush

Also make sure of the deploy mode on your production server. If necessary remove var/generation and var/di (be very carefully with this step).

  • Locally I uploaded the extension in app/code and executed Setup:upgrade execution and it worked as expected but when I uploaded on live server and executed etup:upgrade execution and tried to run the extension and it start throwing the issue. – Peter Jul 18 '17 at 13:08
  • It is compatible with magento version – Peter Jul 18 '17 at 13:09
  • Please see the edit. – Fernando Miguel Jul 18 '17 at 13:16
  • Done with 4 steps but no luck yet let me delete var/generation – Peter Jul 18 '17 at 13:19

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.