The latest releases (2.4 & 2.5) of Rules breaks the 'Payment Method' configuration page. If you disable or enable any of the payment methods they disappear from the UI.

We have reproduced it on a fresh install with Commerce and Rules 2.5. Rolling Rules back to 2.3 resolved it.

Whilst it mentions Rules 2.3 on the project page, it does say that it works with the 'latest release'. It may break other sections, however we've only found this so far. We haven't found the source of this issue yet, as it took a while to track down what had caused it.

#5 commerce-payment-rules-page-2093881-5.patch937 bytesrecrit
PASSED: [[SimpleTest]]: [MySQL] 3,557 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


Adam Wood’s picture

It seems this isn't exclusive to Commerce. Any rule has this issue.

From the Rules issue queue: #1568134: Enabling or disabling a contrib rule makes it disappear

Should this be mentioned on the project page for reference until resolved in Rules?

rszrama’s picture

Title: Rules 7.x-2.5 breaks Commerce payment method admin UI » Rules 7.x-2.5 inadvertently hides disabled payment method rules
Version: 7.x-1.8 » 7.x-1.x-dev
Category: bug » task
Priority: Major » Normal

Ahh, saw another issue about this a minute ago. Yeah, I can update the project page, but most people aren't going to see that before opening an issue. Best is just to leave this issue here open until it's resolved in Rules.

bojanz’s picture

We'll have to hold-off a Kickstart release until this is resolved then: #2085059: Create a new Kickstart 7.x-1.x release.

fago’s picture

Yeah, sry for that breakage. I just committed a fix - see #1568134: Enabling or disabling a contrib rule makes it disappear. Once it's verified it helps, I can roll another release to spread it.

recrit’s picture

Status: Active » Needs review
937 bytes
PASSED: [[SimpleTest]]: [MySQL] 3,557 pass(es). View

With the fix at #1568134: Enabling or disabling a contrib rule makes it disappear, configured payment rules with owner = "commerce_payment" do not show.
The attached patch updates commerce_payment_ui_admin_page() to add a condition for 'owner' => array('rules, 'commerce_payment'). This resolves the payment rules issue. I have not verified, but this could be an issue in other places where Commerce uses RulesPluginUI::overviewTable - checkout, pricing, etc.

Adam Wood’s picture

Patch in #5 works for the payment module.

I forgot to check the other Commerce Rules pages in the end. The same issue exists on them.

rszrama’s picture

There any way to avoid filtering by owner at all? If a user created a rule and then disabled it, wouldn't that mean it would disappear from the list, too?

fago’s picture

If you don't take care of owner, it should just stay 'rules' and you should not have to care at all - i.e. it should work as before. However, this was broken for default-rules (see #1568134: Enabling or disabling a contrib rule makes it disappear) and that way owner became != rules in some cases.

The idea behind owner is that when you set it to "commerce" you want your rules to appear in the commerce Rules ui only, i.e. you filter on commerce then.

I figured we've no good recovery for people that ran into the problem yet though, thus I re-opened #1568134: Enabling or disabling a contrib rule makes it disappear for that.

krystlc’s picture

#5 worked for me~

xbrianx’s picture

Works for me too!! Thanks

fago’s picture

I'd appreciate feedback on whether latest Rules 2.x-dev solves the problem, so we can roll a new tested release.

recrit’s picture

Thanks, the latest Rules 2.x (#18378b3) works for me. After the Rules update 7213, the payment method rules displayed correctly on the page and still showed after re-saving the rules.

rszrama’s picture

Issue summary: View changes
Status: Needs review » Fixed

Just confirming that Rules 7.x-2.6 appears to be working fine for me, too. I'll update it in Kickstart 1.x along with Commerce 1.9 and the new Address Field release asap.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.