magento2-replace-inventory
magento2-replace-inventory copied to clipboard
Notice: Undefined index: inventory_source in Magento ver. 2.4.2-p1
Hello , Installed currently available repo via composer as shown "yireo/magento2-replace-inventory": "^4.2" but it get failed on setup:upgrade
Notice: Undefined index: inventory_source in /var/www/html/vendor/magento/framework/Setup/Declaration/Schema/Declaration/SchemaBuilder.php on line 354
my codebase is not vanilla so maybe it could be my code issue or if you know about this?
Thanks
Could you post line 354 of the mentioned file? Because in that file, I'm not seeing anything that could cause this PHP notice, which leads me to think that somebody created a core hack.
Hello,
I think its related to some of my code , exploring and may update but the error line is following
$referenceTableData = $this->tablesData[$constraintData['referenceTable']];
On Fri, Oct 22, 2021 at 1:32 PM Jisse Reitsma @.***> wrote:
Could you post line 354 of the mentioned file? Because in that file, I'm not seeing anything that could cause this PHP notice, which leads me to think that somebody created a core hack.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yireo/magento2-replace-inventory/issues/15#issuecomment-949406425, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACMMEC4SMDL74XOGKAMED3UIEOSHANCNFSM5GPXNW7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
--
Sajid Hussain Unar
Magento Ecommerce Consultant | Dacoders Agile Innovations
213-457-3386 | @.*** | http://www.dacoders.com
LinkedIn: http://linkedin.com/in/sajidhussain
Unfortunately, this is happening for us. We're on 2.4.2, with:
"yireo/magento2-replace-inventory": "^4.2"
Exactly the same error and line of code as mentioned above.
@wecreatedigital @sajidunnar Could you scan your source code (all of it) for the keyword inventory_source
?
@jissereitsma thank you for the prompt reply. Other than the Magento inventory modules, I've found inventory_source
also in vendor/amasty/shippingtablerates/etc/db_schema.xml
- checking back on an older version of this module, that didn't exist before!
@sajidunnar I don't suppose you also happen to have this Amasty module?
@wecreatedigital It sounds like the Amasty module is having a dependency with the inventory modules, while not declaring the same dependency in their composer file. That classifies as a bug, that you can report to them.
My guess is that @sajidunnar is bumping into a similar issue, with this Amasty module or another module. It does not happen in the Magento core ...
Hello
Yes we have same Amasty module,so I guess it's the reason I will try to disable those and then try again
Thanks
On Mon, Oct 25, 2021, 12:59 PM Jisse Reitsma @.***> wrote:
@wecreatedigital https://github.com/wecreatedigital It sounds like the Amasty module is having a dependency with the inventory modules, while not declaring the same dependency in their composer file. That classifies as a bug, that you can report to them.
My guess is that @sajidunnar https://github.com/sajidunnar is bumping into a similar issue, with this Amasty module or another module. It does not happen in the Magento core ...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yireo/magento2-replace-inventory/issues/15#issuecomment-950631259, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACMMEEWX6IJHIXZEQPLSB3UIUE5BANCNFSM5GPXNW7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@sajidunnar @jissereitsma thank you. I'll report the issue with them but for now I've downgraded to 1.8.4 which is working.
Fyi, I just got the same notice with the Amasty Store Pickup with Locator MSI module. The fk constraint is coming from the amasty module db_schemal.xml so I disabled the module, and yet I am still getting the notice.
Why is Magento still trying to process a schema from a module that's disabled?
PS: This is on Magento 2.4.3-p1
Good point. I would need to debug this myself, but lack the time for that. But my fair guess is that the mentioned module could be declared in the module.xml
of another Amasty module as a dependency (sequence
). Disabling the module works then to some extent, but in other parts, the code will still be called in. I consider this a design flaw of Magento, but will need to debug this.
Instead of disabling the module, you could also apply the same composer trick to remove the module. That would prevent the db_schema.xml
file to be found in the first place.
I'm closing this issue because of inactivity. Feel free to reopen if this is still an issue.