First time posting here for Magento2, so if this is not correct method or place, please let me know how to rectify. Using version 2.1.0 currently.

Hitting http 500 error on product page URL in browser. All other pages of the Magento 2 install are loading fine and as they should. Developer mode turned back on and errors showing in browser as below:

2 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: Magento\Catalog\Block\Product\ProductList\Item\Container
Exception #1 (ReflectionException): Class Magento\Catalog\Block\Product\ProductList\Item\Container does not exist

Have tried the solutions that suggest it's a cache issue. We have cleared the var/generation folder. Not a permissions issue, as all other pages loading fine and have set permissions to be as they need to be following those relevant guides.

Potential for one of the catalog database tables to be corrupt? Missing files?

  • have you checked the existence of : Magento\Catalog\Block\Product\ProductList\Item\Container or maybe it doesnt have correct permissions ? Commented Feb 24, 2017 at 15:03
  • I'm not 100% sure I'm looking in the correct location, but within /httpdocs/vendor/magento/module-catalog/Block/Product/ area there is no folder called Item. Is this the correct location to be looking? i.e. the vendor folder?
    – MagentoMac
    Commented Feb 27, 2017 at 9:44
  • Since when did you get this error ? After an upgrade ? Did you try to remove your vendor/ directory and then composer install again ? Commented Feb 27, 2017 at 10:06
  • This is a fresh install, we've then imported client's products in. I can try updating to latest version if you think that will fix? Hesitant to try major things like the delete of a directory and then re-install as it took us around 20 hours to get the site to this stage. Stable. We are new to Magento2. Experienced in Magento1. I don't want to just guess and re-install everything until it works..... as this has resulted in the site completely breaking in the past and us having to start from scratch.
    – MagentoMac
    Commented Feb 27, 2017 at 11:54
  • 2
    I went to Magento 2.1.0 repository on GitHub to see if the class 'Container' does exist and it doesn't but its added in the newer Magento 2.1.* versions. So my suggestion is removing vendor/ directory and calling composer install command or updating your Magento 2 installation with composer update. My preference is updating Magento 2.1 because you will have newest version and it will be more secure.
    – klict
    Commented Feb 28, 2017 at 9:00

3 Answers 3


Check for var Module permission.

First run

php bin/magento list

Above one gives u where the error is & check error logs in var folder.

If above things not work, then follow below ones

Go to magento\vendor

Delete All Files.

Go to command line to ur Magento Root Path

Run composer install

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush
  • Entire staging area now giving http 500 error on every page...... back to square one again....... this is really what I was trying to avoid.
    – MagentoMac
    Commented Feb 28, 2017 at 19:00
  • Have managed to get frontend back up...... but product page now has http 500 error and developer mode error is not showing any longer.
    – MagentoMac
    Commented Feb 28, 2017 at 19:45
  • After login for admin area, instead of being redirected to dashboard, we see error below now: 1 exception(s): Exception #0 (Exception): Warning: is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s): (/var/www/vhosts/gamefishltd.co.uk/:/tmp/) in /var/www/vhosts/gamefishltd.co.uk/httpdocs/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php on line 914
    – MagentoMac
    Commented Feb 28, 2017 at 19:46
  • Fixing that error then generates another error: 1 exception(s): Exception #0 (Magento\Framework\Exception\FileSystemException): File "/var/www/vhosts/gamefishltd.co.uk/httpdocs/pub/static/_requirejs/adminhtml/Magento/backend/en_US/requirejs-config.js" cannot be opened Warning!fopen(/var/www/vhosts/gamefishltd.co.uk/httpdocs/pub/static/_requirejs/adminhtml/Magento/backend/en_US/requirejs-config.js): failed to open stream: Permission denied
    – MagentoMac
    Commented Feb 28, 2017 at 20:19
  • I've now managed to reproduce the error on the product page in browser - 2 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: Magento\Catalog\Block\Product\ProductList\Item\Container Exception #1 (ReflectionException): Class Magento\Catalog\Block\Product\ProductList\Item\Container does not exist
    – MagentoMac
    Commented Feb 28, 2017 at 20:22

Still no fix for this, but it looks like it is a theme issue. In that the theme code is not working with current version of Magento.

  • Just to confirm issue fixed by convincing the theme developer it was an issue with his theme not being compatible with current version of Magento. He corrected his code for product page, and we've updated to latest version of Magento 2.1.5 and all is now working fine. Hoping some of the above can help others debug a similar issue though. Some of the answers might be valid.
    – MagentoMac
    Commented Mar 8, 2017 at 11:39

Please check your css/js files path by viewing the source code. If they are not accessible because of some version number in their path then you may try running the following mysql query:

INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES ('default', 0, 'dev/static/sign', '0');

Source: https://github.com/magento/magento2/issues/7869

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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