2

I have developed a module for magento 2. Trying to submit in the marketplace its give the following errors:

Environment: Operating System - Centos 7, PHP Version - 7.0.21, Magento Platform - 2.0.17 CE Varnish, Sampla Data
Command:
vendor/bin/phpunit
Installation issue:
http://magento.dev/gear.html page doesn't contain HIT in cache header.
http://magento.dev/gear/bags.html page doesn't contain HIT in cache header.
http://magento.dev/gear/fitness-equipment.html page doesn't contain HIT in cache header.
http://magento.dev/gear/watches.html page doesn't contain HIT in cache header.
http://magento.dev/home page doesn't contain HIT in cache header.
http://magento.dev/enable-cookies page doesn't contain HIT in cache header.
http://magento.dev/privacy-policy-cookie-restriction-mode page doesn't contain HIT in cache header.
http://magento.dev/about-us page doesn't contain HIT in cache header.
http://magento.dev/customer-service page doesn't contain HIT in cache header.
http://magento.dev/gear/bags/joust-duffle-bag.html page doesn't contain MISS in cache header.   Show less


Environment: Operating System - Centos 7, PHP Version - 7.0.21, Magento Platform - 2.1.11 CE Varnish, Sampla Data
Command:
vendor/bin/phpunit
Installation issue:
http://magento.dev/gear.html page doesn't contain HIT in cache header.
http://magento.dev/gear/bags.html page doesn't contain HIT in cache header.
http://magento.dev/gear/fitness-equipment.html page doesn't contain HIT in cache header.
http://magento.dev/gear/watches.html page doesn't contain HIT in cache header.
http://magento.dev/joust-duffle-bag.html page doesn't contain HIT in cache header.
http://magento.dev/strive-shoulder-pack.html page doesn't contain HIT in cache header.
http://magento.dev/crown-summit-backpack.html page doesn't contain HIT in cache header.
http://magento.dev/wayfarer-messenger-bag.html page doesn't contain HIT in cache header.
http://magento.dev/home page doesn't contain HIT in cache header.
http://magento.dev/enable-cookies page doesn't contain HIT in cache header.
http://magento.dev/privacy-policy-cookie-restriction-mode page doesn't contain HIT in cache header.
http://magento.dev/about-us page doesn't contain HIT in cache header.
http://magento.dev/customer-service page doesn't contain HIT in cache header.
http://magento.dev/joust-duffle-bag.html page doesn't contain HIT in cache header.   Show less
1

This is caching validation issue in Magento 2. To resolve this remove <block class="Block\Class" name="blockname" cacheable="false" /> from the layout xml. Never set $this->_isScopePrivate to true in the block. Both these breaks the cache and magento marketplace throws errors.

$this->_isScopePrivate = false from all the blocks.

Hopefully, it will resolve the issue

|improve this answer|||||

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