Closed (fixed)
Project:
Commerce UPS
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Jul 2012 at 22:31 UTC
Updated:
30 Oct 2012 at 01:44 UTC
Jump to comment: Most recent file
While reviewing an issue for Commerce USPS (http://drupal.org/node/1666102#comment-6241022), I've noticed that the rules and menu caches are not properly cleared when saving settings for both USPS and UPS modules. This causes rates to not be calculated until the rules cache was cleared. Also, the menu items on admin/commerce/config/shipping/services/ups are not displayed after saving the UPS settings form.
To resolve this I check the commerce_ups_services variable before it's updated and then compare it to the submitted form_state values. If there is any difference then the caches are cleared. If the values are the same, caches are left alone to prevent added load.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1688340_clear-caches-after-save.patch | 919 bytes | andyg5000 |
Comments
Comment #1
andyg5000Patch attached
Update: If you apply this patch, be sure to disable and re-enable at least one shipping method (ie: UPS Ground). This will force the cache clearing that this patch was made for.
Comment #2
ultimike@andyg5000,
I just tested this patch and it appears to be sound. As soon as we get one or two more people to test it, then I'll go ahead and get it committed.
Thanks,
-mike
Comment #3
trimax commentedI was having the problem of the UPS option not showing on shipping page during checkout. Following andyg5000 suggestion I applied this patch and it has fixed the problem. This solution worked on this configuration:
- Commerce Kickstart (commerce_kickstart-7.x-2.0-rc2)
- Commerce Shipping 7.x-2.0-beta1+19-dev
- Commerce UPS 7.x-1.x-dev.
Comment #4
ultimikeCommitted and pushed. Thanks @andyg5000!
-mike