Magento – Reference to undeclared plugin with name ‘stockedProductsFilterPlugin’ warning in di compile magento 2.3.2

magento2pluginsetup-di-compile

I have recently upgraded my site from Magento 2.2.6 to Magento 2.3.2.
During each di compilation it shows a warning like

main.INFO: Reference to undeclared plugin with name 'stockedProductsFilterPlugin'. [] []

When i debugged this case and i found that in Magento 2.3.0 there was a plugin available with this name in 'module-elasticsearch' module and in Magento 2.3.2 they have removed that plugin and definition from that module. But in the module 'module-inventory-elasticsearch' they are written to disable that plugin which is currently not existing like below.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider">
    <plugin name="stockedProductsFilterPlugin" disabled="true"/>
    <plugin name="stockedProductFilterByInventoryStockPlugin" type="Magento\InventoryElasticsearch\Plugin\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider\StockedProductFilterByInventoryStock"/>
</type>

So since there is no definition for that plugin this warning is showing. So how we can remove this warning from di compile. When i removed the disabling code from this module the warning will gone. But we are not supposed to edit the magento core files. Also another way i found create a dummy plugin with the same name, but this is a bad way. Any other solution for this?

Best Answer

I'm having a similar error reported in system.log:

main.INFO: Reference to undeclared plugin with name 'priceIndexUpdater'

Mage Version: 2.3.6

When: The log occurs when finalizing checkout: pushing "Place order" button, we have a "Something went wrong ..." message too.

@amesh wrote: "We have just created a patch to remove this code from the di.xml file". How did you create that patch? Did you simply comment xml definitions apparently related to error?

Thank you so much ...

Related Topic