Open ryssbowh opened 1 month ago
Hi @ryssbowh
Thank you for your message, this sounds like a bit of an odd issue.
A couple of quick follow-up questions about when you are deleting/recreating the cart:
Thanks
Hi @nfourtythree
The order is soft deleted with Craft::$app->getElements()->deleteElementById($cart->id)
We don't copy anything on the new cart, either the users have primary addresses and their are automatically assigned to it or they don't but they would see an error later in the workflow
Hi @ryssbowh
Thank you for the answers.
Looking at the stack trace it says "Invalid owner ID: 853069", is that the ID of the order that you just deleted?
Thanks
Yes that's correct @nfourtythree
Hi @ryssbowh
Unfortunately, we are unable to replicate this in any way.
Could you please send a database backup and your composer files to support@craftcms.com, referencing this issue so we can look into this further?
Thanks!
@nfourtythree Sorry I missed this, I've just sent the files through wetransfer.
Note that I also see the same issue on another website I maintain
Hi @ryssbowh
Files received and reply sent in support.
Thanks!
What happened?
Description
We have a commerce website that creates carts programmatically depending on user actions. A user may choose an order of type "A", not go through with it, and then order a type "B". When that happens we delete the current cart and recreate it as it contains different products & custom fields.
Then jobs are spawned to update the search indexes for the addresses of the now deleted cart and they fail as the order doesn't exist anymore. the error I get is :
I've tried to bypass those jobs with something like this :
But that doesn't work, somehow the order is still set as an owner on the address and the job goes through.
Steps to reproduce
Expected behavior
The jobs are either not spawned or go through
Actual behavior
Jobs are failing
Craft CMS version
4.12.4
Craft Commerce version
4.6.12
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
-