Magento 2.3.3 - Can't use product import with MSI modules disabled
Using last version of m2if and Magento 2.3.3 if you disable all modules MSI the product imports rase this exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.inventory_source' doesn't exist
Ty for your support To Reproduce Steps to reproduce the behavior:
- disable all MSI modules
- setup:upgrade
- launch product imports
- See error
Expected behavior It should not rase an exception if I choose to not use the new inventory modules (MSI).
The importer is granulated so that the product import executes many individual "steps". The MSI import is only one step of many. If the MSI import is not needed, it should be removed from the "Steps".
Also the importer can be overlaid in Magento manner, but it is based on Symfony.
Instructions for own module for overlaying Smfony DI (or whole Observer) can be found here: https://docs.met.tdintern.de/pacemaker/1.3/ce_how-to-extend.html
Below I have the add_update from the current Importer 3.8.x Config (service.xml) with the commented out step for MSI. This can of course be removed completely.
<service id="import_product.observer.composite.base.add_update" class="TechDivision\Import\Observers\GenericCompositeObserver">
--
<call method="addObserver">
<argument id="import.observer.attribute.set" type="service"/>
</call>
<call method="addObserver">
<argument id="import.observer.additional.attribute" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product.observer.url.key" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product.observer.file.upload" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product.observer.quality.and.stock.status" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product.observer.product" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product.observer.product.website.update" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product.observer.category.product.update" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product.observer.product.inventory.update" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product.observer.product.attribute.update" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product_url_rewrite.observer.product.url.rewrite" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product_variant.observer.product.variant" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product_bundle.observer.product.bundle" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product_media.observer.product.media" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product_media.observer.clean.up.media.gallery" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product_link.observer.product.link" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product_grouped.observer.product.grouped" type="service"/>
</call>
<!-- <call method="addObserver">-->
<!-- <argument id="import_product_msi.observer.product.source.item" type="service"/>-->
<!-- </call>-->
<call method="addObserver">
<argument id="import_product_tier_price.observer.product.tier_price" type="service"/>
</call>
<call method="addObserver">
<argument id="import_product.observer.clean.up" type="service"/>
</call>
</service>
In a workaround perspective I think it's perfect, but the system includes this step or should it work automatically with or without MSI? Thanks for the hint, however, it worked like a charm