Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Regression in 5.2.8 - Argument #1 ($id) must be of type int, null given - Inventory.php #3849

Open
sunscreem opened this issue Jan 14, 2025 · 1 comment

Comments

@sunscreem
Copy link

What happened?

Description

After upgrading from 5.2.7 to 5.2.8, when running a FeedMe run to create a new product, it fails to create fully.

The product is created but the variant isn't and feedme throws the following error:

craft\commerce\services\Inventory::getInventoryItemById(): Argument #1 ($id) must be of type int, null given, called in /home/jamiesoncarry/site/[jamieson-carry.com/vendor/craftcms/commerce/src/services/Inventory.php](http://jamieson-carry.com/vendor/craftcms/commerce/src/services/Inventory.php) on line 81 - Inventory.php: 88

I've tried to debug this myself by going through the changes introduced in 5.2.8 (compare is here) but reverseing each of these in turn and I've been unable to find the exact problem.

Steps to reproduce

  1. Install Commerce 5.2.8
  2. Try to create a new product via feed me.

I can send over a screen grab of the feedme settings and a copy of the json from the product I'm trying to create if needed, however I've a feeling you'll spot the issue that I couldn't.

Craft CMS version

5.5.7

Craft Commerce version

5.2.8

PHP version

8.3.9

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant