I've been having some trouble with M2.4 after an upgrade from 2.3.5.
Getting this error on product pages only, backend and all other pages seem to work fine.
I have used
rm -rf generated
rm -rf var/cache
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy en_GB -f
php bin/magento cache:clean
php bin/magento cache:flush
& nothing helps.
ArgumentCountError: Too few arguments to function Magento\InventoryCatalog\Plugin\CatalogInventory\Helper\Stock\AdaptAssignStatusToProductPlugin::beforeAssignStatusToProduct(), 2 passed in /var/www/html/vendor/magento/framework/Interception/Interceptor.php on line 121 and exactly 3 expected in /var/www/html/vendor/magento/module-inventory-catalog/Plugin/CatalogInventory/Helper/Stock/AdaptAssignStatusToProductPlugin.php:71
Stack trace: #0 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(121): Magento\InventoryCatalog\Plugin\CatalogInventory\Helper\Stock\AdaptAssignStatusToProductPlugin->beforeAssignStatusToProduct(Object(Magento\CatalogInventory\Helper\Stock\Interceptor), Object(Magento\Catalog\Model\Product\Interceptor)) #1 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\CatalogInventory\Helper\Stock\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Catalog\Model\Product\Interceptor)) #2 /var/www/html/generated/code/Magento/CatalogInventory/Helper/Stock/Interceptor.php(26): Magento\CatalogInventory\Helper\Stock\Interceptor->___callPlugins('assignStatusToP...', Array, Array) #3 /var/www/html/vendor/magento/module-catalog-inventory/Observer/AddInventoryDataObserver.php(37): Magento\CatalogInventory\Helper\Stock\Interceptor->assignStatusToProduct(Object(Magento\Catalog\Model\Product\Interceptor)) #4 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Magento\CatalogInventory\Observer\AddInventoryDataObserver->execute(Object(Magento\Framework\Event\Observer)) #5 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\CatalogInventory\Observer\AddInventoryDataObserver), Object(Magento\Framework\Event\Observer)) #6 /var/www/html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer)) #7 /var/www/html/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('catalog_product...', Array) #8 /var/www/html/vendor/magento/framework/Model/AbstractModel.php(581): Magento\Framework\Event\Manager\Proxy->dispatch('catalog_product...', Array) #9 /var/www/html/vendor/magento/module-catalog/Model/Product.php(1098): Magento\Framework\Model\AbstractModel->_afterLoad() #10 /var/www/html/vendor/magento/framework/Model/AbstractModel.php(605): Magento\Catalog\Model\Product->_afterLoad() #11 /var/www/html/vendor/magento/framework/EntityManager/Observer/AfterEntityLoad.php(34): Magento\Framework\Model\AbstractModel->afterLoad() #12 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Magento\Framework\EntityManager\Observer\AfterEntityLoad->execute(Object(Magento\Framework\Event\Observer)) #13 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Framework\EntityManager\Observer\AfterEntityLoad), Object(Magento\Framework\Event\Observer)) #14 /var/www/html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer)) #15 /var/www/html/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('magento_catalog...', Array) #16 /var/www/html/vendor/magento/framework/EntityManager/EventManager.php(51): Magento\Framework\Event\Manager\Proxy->dispatch('magento_catalog...', Array) #17 /var/www/html/vendor/magento/framework/EntityManager/Operation/Read.php(119): Magento\Framework\EntityManager\EventManager->dispatchEntityEvent('Magento\Catalog...', 'load_after', Array) #18 /var/www/html/vendor/magento/framework/EntityManager/EntityManager.php(70): Magento\Framework\EntityManager\Operation\Read->execute(Object(Magento\Catalog\Model\Product\Interceptor), '89', Array) #19 /var/www/html/vendor/magento/module-catalog/Model/ResourceModel/Product.php(716): Magento\Framework\EntityManager\EntityManager->load(Object(Magento\Catalog\Model\Product\Interceptor), '89') #20 /var/www/html/vendor/magento/framework/Model/AbstractModel.php(540): Magento\Catalog\Model\ResourceModel\Product->load(Object(Magento\Catalog\Model\Product\Interceptor), '89', NULL) #21 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\Model\AbstractModel->load('89') #22 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Model\Product\Interceptor->___callParent('load', Array) #23 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\Product\Interceptor->Magento\Framework\Interception{closure}('89') #24 /var/www/html/generated/code/Magento/Catalog/Model/Product/Interceptor.php(65): Magento\Catalog\Model\Product\Interceptor->___callPlugins('load', Array, Array) #25 /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php(308): Magento\Catalog\Model\Product\Interceptor->load('89') #26 /var/www/html/generated/code/Magento/Catalog/Model/ProductRepository/Interceptor.php(37): Magento\Catalog\Model\ProductRepository->getById('89', false, NULL, false) #27 /var/www/html/vendor/magento/module-swatches/Helper/Data.php(270): Magento\Catalog\Model\ProductRepository\Interceptor->getById('89') #28 /var/www/html/vendor/magento/module-swatches/Block/Product/Renderer/Listing/Configurable.php(228): Magento\Swatches\Helper\Data->loadVariationByFallback(Object(Magento\Catalog\Model\Product\Interceptor), Array) #29 /var/www/html/vendor/magento/module-swatches/Block/Product/Renderer/Listing/Configurable.php(205): Magento\Swatches\Block\Product\Renderer\Listing\Configurable->getProductVariationWithMedia(Object(Magento\Catalog\Model\Product\Interceptor), Array) #30 /var/www/html/vendor/magento/module-configurable-product/Block/Product/View/Type/Configurable.php(247): Magento\Swatches\Block\Product\Renderer\Listing\Configurable->_getAdditionalConfig() #31 /var/www/html/vendor/magento/module-swatches/Block/Product/Renderer/Listing/Configurable.php(154): Magento\ConfigurableProduct\Block\Product\View\Type\Configurable->getJsonConfig() #32 /var/www/html/var/view_preprocessed/pub/static/vendor/magento/module-swatches/view/frontend/templates/product/listing/renderer.phtml(9): Magento\Swatches\Block\Product\Renderer\Listing\Configurable->getJsonConfig() #33 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/html/v...') #34 /var/www/html/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Swatches\Block\Product\Renderer\Listing\Configurable\Interceptor), '/var/www/html/v...', Array) #35 /var/www/html/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView('/var/www/html/v...') #36 /var/www/html/vendor/magento/module-swatches/Block/Product/Renderer/Configurable.php(481): Magento\Framework\View\Element\Template->_toHtml() #37 /var/www/html/vendor/magento/module-swatches/Block/Product/Renderer/Configurable.php(459): Magento\Swatches\Block\Product\Renderer\Configurable->getHtmlOutput() #38 /var/www/html/vendor/magento/module-swatches/Block/Product/Renderer/Listing/Configurable.php(125): Magento\Swatches\Block\Product\Renderer\Configurable->_toHtml() #39 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Swatches\Block\Product\Renderer\Listing\Configurable->_toHtml() #40 /var/www/html/vendor/magento/framework/Cache/LockGuardedCacheLoader.php(136): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}() #41 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1133): Magento\Framework\Cache\LockGuardedCacheLoader->lockedLoadData('BLOCK_fcf09c021...', Object(Closure), Object(Closure), Object(Closure)) #42 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(675): Magento\Framework\View\Element\AbstractBlock->_loadCache() #43 /var/www/html/vendor/magento/module-swatches/Block/Product/Renderer/Configurable.php(449): Magento\Framework\View\Element\AbstractBlock->toHtml() #44 /var/www/html/vendor/magento/module-catalog/Block/Product/AbstractProduct.php(471): Magento\Swatches\Block\Product\Renderer\Configurable->toHtml() #45 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Block\Product\AbstractProduct->getProductDetailsHtml(Object(Magento\Catalog\Model\Product\Interceptor)) #46 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Block\Product\ListProduct\Interceptor->___callParent('getProductDetai...', Array) #47 /var/www/html/vendor/paypal/module-braintree-core/Plugin/ProductDetailsBlockPlugin.php(37): Magento\Catalog\Block\Product\ListProduct\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Catalog\Model\Product\Interceptor)) #48 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): PayPal\Braintree\Plugin\ProductDetailsBlockPlugin->aroundGetProductDetailsHtml(Object(Magento\Catalog\Block\Product\ListProduct\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor)) #49 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Block\Product\ListProduct\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Catalog\Model\Product\Interceptor)) #50 /var/www/html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor.php(26): Magento\Catalog\Block\Product\ListProduct\Interceptor->___callPlugins('getProductDetai...', Array, NULL) #51 /var/www/html/var/view_preprocessed/pub/static/vendor/magento/module-catalog/view/frontend/templates/product/list.phtml(1): Magento\Catalog\Block\Product\ListProduct\Interceptor->getProductDetailsHtml(Object(Magento\Catalog\Model\Product\Interceptor)) #52 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/html/v...') #53 /var/www/html/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Product\ListProduct\Interceptor), '/var/www/html/v...', Array) #54 /var/www/html/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView('/var/www/html/v...') #55 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Framework\View\Element\Template->_toHtml() #56 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1115): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}() #57 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(675): Magento\Framework\View\Element\AbstractBlock->_loadCache() #58 /var/www/html/vendor/magento/framework/View/Layout.php(566): Magento\Framework\View\Element\AbstractBlock->toHtml() #59 /var/www/html/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Layout->_renderBlock('category.produc...') #60 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('category.produc...') #61 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('category.produc...') #62 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('category.produc...', true) #63 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(522): Magento\Framework\View\Layout\Interceptor->renderElement('category.produc...', true) #64 /var/www/html/vendor/magento/module-catalog/Block/Category/View.php(100): Magento\Framework\View\Element\AbstractBlock->getChildHtml('product_list') #65 /var/www/html/var/view_preprocessed/pub/static/vendor/magento/module-catalog/view/frontend/templates/category/products.phtml(1): Magento\Catalog\Block\Category\View->getProductListHtml() #66 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/html/v...') #67 /var/www/html/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Category\View), '/var/www/html/v...', Array) #68 /var/www/html/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView('/var/www/html/v...') #69 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Framework\View\Element\Template->_toHtml() #70 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1115): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}() #71 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(675): Magento\Framework\View\Element\AbstractBlock->_loadCache() #72 /var/www/html/vendor/magento/framework/View/Layout.php(566): Magento\Framework\View\Element\AbstractBlock->toHtml() #73 /var/www/html/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Layout->_renderBlock('category.produc...') #74 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('category.produc...') #75 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('category.produc...') #76 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('category.produc...', false) #77 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement('category.produc...', false) #78 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('content', false) #79 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('content') #80 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content') #81 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('content', false) #82 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement('content', false) #83 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('main', false) #84 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main') #85 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main') #86 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main', false) #87 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement('main', false) #88 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('columns', false) #89 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('columns') #90 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns') #91 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('columns', false) #92 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement('columns', false) #93 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('main.content', false) #94 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main.content') #95 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content') #96 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main.content', false) #97 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement('main.content', false) #98 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) #99 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') #100 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper') #101 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', false) #102 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false) #103 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('root', false) #104 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root') #105 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root') #106 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true) #107 /var/www/html/vendor/magento/framework/View/Layout.php(963): Magento\Framework\View\Layout\Interceptor->renderElement('root') #108 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput() #109 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array) #110 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception{closure}() #111 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array) #112 /var/www/html/vendor/magento/framework/View/Result/Page.php(258): Magento\Framework\View\Layout\Interceptor->getOutput() #113 /var/www/html/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor)) #114 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor)) #115 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array) #116 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Response\Http\Interceptor)) #117 /var/www/html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(26): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array) #118 /var/www/html/vendor/magento/framework/App/Http.php(120): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor)) #119 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch() #120 /var/www/html/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch() #121 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor)) #122 {main} [] []
I've checked file permissions, all owned by the 'magento_user' who is a member of the www-data group, all files set to 755/644 according to the doc's. Turned dev mode off & on again, cleared cache, recompiled etc but still the product page throws up this error, anyone have an idea?
Using debian 10, php7.4 (but happens with 7.3 too), elastic search seems to be installed ok & shows v7 when asked, I'm at a loss now :(