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.
When I click the conditions link of the COD payment method I get:
admin/store/settings/payment/manage/uc_payment_method_cod" could not be found.
Comment | File | Size | Author |
---|---|---|---|
#8 | ubercart-payment_conditions-2412161-8.patch | 1.25 KB | tinker |
Comments
Comment #1
TR CreditAttribution: TR commentedWorks for me. The page that link points to is provided by the Rules UI module, so make sure you have Rules UI enabled. If you do, please check your other 'conditions' links on /admin/store/settings/payment and /admin/store/settings/quotes to see if any of the other links work. What version of Rules do you have installed?
Comment #2
ñull CreditAttribution: ñull commentedI tried to reproduce what I saw yesterday, but I can't. May be it was a cache issue and after clearing it now works.
Comment #3
tinker CreditAttribution: tinker as a volunteer commentedNoticed the same issue and can reproduce. This only occurs if uc_payment_pack is enabled after uc_payment using admin modules page. To reproduce:
- disable and uninstall uc_payment_pack
- disable and uninstall uc_payment (must happen to remove existing rules)
- enable uc_payment
- enable uc_payment_pack (do not use drush for this command)
Problem is that Rules component 'COD conditions' is not created until rules cache is rebuilt. This stems from uc_payment.rules_defaults.inc
This can be fixed by clearing Rules cache in hook_install.
Don't know how good this solution is as it seems heavy handed. If it's acceptable I can roll a patch.
Also happens for uc_cybersource and potentially all payment methods that do not use uc_credit.
Comment #4
tinker CreditAttribution: tinker as a volunteer commentedDupe issue #1571084: Cannot add conditions to "check" as it says "page not found" for 'Check' method closed for same reason.
Comment #5
TR CreditAttribution: TR commentedNice catch! That's a reasonable solution, as it only has to be done at install time. I'm almost positive the same fix will be needed with all the shipping methods as well.
I'll try to reproduce this. A patch would be greatly appreciated.
Comment #6
longwaveCould this be done in hook_modules_enabled in uc_payment/uc_quote if this affect all methods? Enabling a module is a rare operation so I think it should be okay to do every time.
Comment #7
tinker CreditAttribution: tinker as a volunteer commented@longwave thx for the idea. Think that is a better solution.
Looking at rules cache there does not seem to be a way to rebuild one component at a time so rules_clear_cache() appears to be a clean as it will get.
Don't have time to test right now but does the following seem acceptable?
Patch will follow after testing.
Comment #8
tinker CreditAttribution: tinker as a volunteer commentedTesting revealed that rules_clear_cache() was not an effective solution. Switched to entity_defaults_rebuild(array('rules_config')). Patch uses uc_payment_modules_enabled() to fix issue for all payment methods and is for 7.x-3.x-dev.
Comment #9
tinker CreditAttribution: tinker as a volunteer commentedForgot to mention that reinstalling uc_payment module revealed another bug #2533192: Duplicate key payment_received when reinstalling uc_payment. Please make sure to apply that patch or delete 'payment_received' row from 'uc_order_statuses' table before reinstalling uc_payment module as the database error will stop the uc_payment_default_rules_configuration() from being executed.
Comment #10
TR CreditAttribution: TR commented