craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
226 stars 170 forks source link

[5.x]: Multi-Store Inventory not loading #3696

Open AndrewMac opened 1 month ago

AndrewMac commented 1 month ago

What happened?

Inventory seemed to be working okay when I had just one store, but stopped working when I added a second store. The screen just sits there with the spinning loading icon.

I also tried an inventory transfer and got an error: TypeError craft\commerce\collections\UpdateInventoryLevelCollection::craft\commerce\collections{closure}(): Argument #1 ($updateInventoryLevel) must be of type craft\commerce\models\inventory\UpdateInventoryLevel, craft\commerce\models\inventory\UpdateInventoryLevelInTransfer given

Craft CMS version

Pro 5.4.6

Craft Commerce version

Pro 5.1.2

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

-

linear[bot] commented 1 month ago

PT-2180 [5.x]: Multi-Store Inventory not loading

lukeholder commented 1 month ago

Hi, could you expand on "The screen just sits there with the spinning loading icon." which screen is that?

Could you send your DB backup, composer.json and composer.lock to support@craftcms.com and reference this issue please? Include the steps to reproduce.

We can then take a look at trying to reproduce what is causing the issue. Thanks

AndrewMac commented 1 month ago

The main Commerce: Inventory screen. I will ask my client about sending the DB, but they have not allowed that in the past.

lukeholder commented 1 month ago

No worries, can you run the php craft gc and php craft resave/products commands and see if that fixes the issue?

AndrewMac commented 1 month ago

I ran the gc command without issue, but when I tried "ddev craft resave/products" it told me that "No products exist for that criteria" (resaving entries worked just fine, though?). That's all a bit strange, though, because the same command works okay on a brand-new Craft/Commerce-only site I just set up to test this issue for incompatible plugins. I still get the spinning wheel on the project site, and with the resave command not working I can't see if that fixes things.

I can also report that the inventory screen loads okay on that new Craft/Commerce-only site I just set up. But the inventory transfer is still giving the error. Just to make sure I read the docs correctly: I set up the transfer, then tried to set the transfer to 'pending'. And that's when the TypeError I reported above kicks in.

idleog commented 1 month ago

same problem here. when going in cp commerce->products site hangs, I have to restart ddev.

I ran craft resave/products, makes about 1 product per half an hour...

idleog commented 1 month ago

Image

lukeholder commented 1 week ago

@idleog did you send your db to support@caftcms.com and reference this ticket?

idleog commented 1 week ago

I did via wetransfer, but maybe without reference to this ticket. I am resending now again via wetarnsfer a dump with not all products (but still products with variants, causing problems)