-
Notifications
You must be signed in to change notification settings - Fork 171
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
[4.x][5.x]: Tidy up UserException thrown during pending user purge? #3686
Comments
Thanks @nfourtythree @lukeholder |
Hi @samhibberd Commerce versions Thanks! |
Actually @lukeholder @nfourtythree thinking about it, this doesn't change much for us (as in we still push craft errors to Sentry). Would it be fair to argue in this case that this is not actually an error, or a warning, it's doing exactly what it should, prevent the deleting of an user that has an order. Should the logging level not be set to info? |
Agree with @samhibberd. This shouldn't be logged as an Error. It's Info or, at worst, a Warning. |
@peteeveleigh @samhibberd is is logged as info now: https://github.com/craftcms/cms/pull/13494/files#diff-b306bfe80cb67a6f20bb99a1019385d006e706dc7033449406686bf8a83f3026R1246 Let me know if you have any other questions. Thanks |
Sorry just realised you were referring to our logging in Commerce. I have gone ahead and fixed that for the next release in 5.3.x To get the fix early, change your "require": {
"craftcms/commerce": "5.x-dev#5a31da5714f7442f5fd864274ebaccbf51a95db3 as 5.3.0.2",
"...": "..."
} Then run We will update this ticket once the release is out. |
Commerce version Thanks! |
Will this make it into the 4.x branch @nfourtythree ? |
HI @samhibberd Yes this is in the It will be included in the next release of Commerce 4. To get this early, change your "require": {
"craftcms/commerce": "4.x-dev as 4.8.0.1",
"...": "..."
} Then run Thanks! |
Hi This update has now been back ported to Commerce 4 in version Thanks! |
What happened?
Could the UserException thrown during the pending user purge be reworked, we use sentry to monitor exceptions and this has added ~100k issues to our usage:
commerce/src/services/Orders.php
Lines 188 to 200 in 8f6a112
As the user is correctly not being deleted as the user (customer) has an order, could this not be handled - the activation code / state be removed, or event added to the user purge logic so commerce could hook into that and exclude users that have an order?
Also is there a reason you don't return the
isValid = false
and intead throw the excpetion?Impacts both 4.x and 5.x
Craft CMS version
4.10.8
Craft Commerce version
4.6.7
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
The text was updated successfully, but these errors were encountered: