Open vendor/magento/module-catalog/Plugin/Block/Topmenu.php
The constructor of this class looks like
public function __construct(
\Magento\Catalog\Helper\Category $catalogCategory,
\Magento\Catalog\Model\ResourceModel\Category\StateDependentCollectionFactory $categoryCollectionFactory,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Catalog\Model\Layer\Resolver $layerResolver
)
Now, open TemplateMonster\Megamenu\Plugin\Block\Topmenu
and take a look at its __construct
method.
Your first check should be if parent::_construct()
is called.
If it does, what parameters are send there?
Your checks here:
A. Does parent::__construct
receives 4 parameters?
B. What variable is send as a second parameter?
This last one is actually the problem: the second parameter that you send is NOT of type
\Magento\Catalog\Model\ResourceModel\Category\StateDependentCollectionFactory
but of type
\Magento\Catalog\Model\ResourceModel\Category\CollectionFactory
Inject the correct type for the second parameter, confirm that the rest are send as expected, re-compile if you must, and you are done :).
I hope this helps.
Please re-check your code.
Try to find classes constructor with
\Eav\Model\Entity\Attribute\Source\ConfigFactory
in code you have line like this
$this->configFactory->create();
but should be
$this->configFactory->create($optionsData);
You should pass parameter into factory create function.
I hope it will help you to solve this issue.
Best Answer
For affected product has no SKU. Add SKU for that product this error will be fixed. You can update directly from MySQL, the table name is: catalog_product_entity