Needs review
Project:
Commerce Recurring Framework
Version:
7.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2013 at 15:15 UTC
Updated:
20 Aug 2018 at 13:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pcambraYeah, this one was already there ;)
#1974664: Review the delete recurring entity process
Comment #2
veso_83 commentedThis is slightly different issue, the message for unsuccessful deletion appears because entity->delete() function will not return anything on success, just empty result!
See: http://drupalcontrib.org/api/drupal/contributions%21entity%21includes%21...
That’s why to avoid that error message the code needs to be reshuffled. A patch is attached
Comment #3
pcambraComment #4
geertvd commentedBumped into the same issue, this patch fixes it.
Comment #5
pcambraCool, thanks. We need a test and we're good to go.
Comment #6
geertvd commentedI created a new
commerce_recurring_ui.testfile but wanted to use some of the helper functions incommerce_recurring.testso I moved those to a new filecommerce_recurring_base.test.Lot's of moving around for such a small test, I hope this is not out of scope for this.
edit: forgot to add a new line to the
commerce_recurring_ui.infofile, I guess this can be fixed on commit if this is green.Comment #7
webadpro commentedPatch in #2 fixed it for me.
Comment #8
heddnInstead of calling $entity->delete and checking status, we need to check if the entity still exists. Calling entity_delete or $entity->delete() will always return nothing of value.
Comment #9
g33kg1rl commentedNever mind, unrelated issue.
Comment #10
sgdev commentedPer @heddn's feedback, here is an updated patch that checks for the existence of the recurring entity after it has been deleted.
Please review, thanks.
Comment #11
deggertsen commentedThis looks good to me. Thanks ron_s, this looks like the best solution.