Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
commerce_customer_profile_can_delete()
is used to unset the $profiles array key but then if there are profiles in the array that are deletable $profiles
is not empty and it deletes them anyway.
Proposed resolution
Unset also from the $profile_ids
array.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#12 | 2460491-12.patch | 3 KB | joelpittet |
#12 | interdiff.txt | 1.45 KB | joelpittet |
#1 | 2460491-1-profile-with-order-delete.patch | 2.26 KB | joelpittet |
#1 | 2460491-1-tests-only.patch | 1.6 KB | joelpittet |
Comments
Comment #1
joelpittetHere's with tests only and with a fix.
Comment #4
joelpittetWrong one failed, that is bizarre, I guess I'll need to step through this.
Comment #7
rszrama CreditAttribution: rszrama commentedTagging for http://contribkanban.com/#/board/commerce/7.x-1.x.
Comment #12
joelpittetHopeful retests:( Realized I'm dumb the profile_ids aren't keyed by profile_id. DOH!
Comment #13
joelpittetThe tests only patch is still in #1 hasn't changed so if this is green. We win!
Comment #14
mglamanApplies, prevents deletion of profiles. Only if all profiles passed failed to pass commerce_customer_profile_can_delete() would nothing get deleted. Even if one did all would be removed.
Fork extra kicks ran the tests on my GitHub+Travis fork https://travis-ci.org/mglaman/commerce-d7-travis/builds/72356123 with a patch branch.
Comment #15
joelpittetHas tests, thanks @mglaman bumping priority.
Comment #16
joelpittetComment #17
mglamanThanks, and committed!