Rules supports using multiple UIs, however there is no good way to keep track of via which UI a rule is configured. There is $rule->module which initially was there for that, however meanwhile that's also used for the module who exported a rule.

However, we want exported rules to still belong to a certain UI to allow UIs to filter on that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago’s picture

Status: Active » Needs review
FileSize
4.5 KB

Attached patch adds a new owner column, allowing modules to keep track of the configurations managed via a custom UI.

fago’s picture

Updated patch to also include the new property when serializing rules.

fago’s picture

fixed setting owner during save.

fago’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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

Angry Dan’s picture

Status: Closed (fixed) » Active

I think this is the source of a problem for me in the new version. Rules exported via features no now longer appear in the list for editing. Maybe rules exported by features should still have an owner of "rules"?

GuyPaddock’s picture

Title: Keep track via which UI a rules has been configured » After update to Rules 2.4/2.5, some Rules components disappear from Rules component listing

Yes, just ran into this myself after updating to 2.5. It looks like the owner column is empty on rules that were imported with Features prior to 2.4.

I had to disable my feature and uninstall it, then re-enable it to make the components appear again.

Strangely, the components would appear if the feature was in its default state, but as soon as I'd open a component for editing and make a change, the components would disappear after the save. It could still edit them if I knew the URL.

gjones’s picture

I'm having the same issue.
I had to completely remove my rules from the feature.

  1. Remove rules from feature, recreate the feature, disable it.
  2. Change the module and owner tables for each rule back to "rules".
  3. Re-enable the feature.
kevinquillen’s picture

Priority: Normal » Major

I had serious issues with existing Rules when upgrading.

When I updated settings on Authnet payment rule, or set it to active, the whole thing vanished from the Rules UI. I disabled, uninstalled, and cleared cache, that did not work.

When I looked at the db table, the Rule owner said 'commerce payment'. I deleted that record, and repeated the above process. This time, when I installed it, the owner was 'rules', progress, I thought.

Then I edited it. The owner was set back to commerce_payment, and it disappeared from the interface again. If I set the owner in the database to rules, it appeared in the admin interface.

This is a really annoying bug.

fago’s picture

Title: After update to Rules 2.4/2.5, some Rules components disappear from Rules component listing » Keep track via which UI a rules has been configured
Status: Active » Fixed

Please do not change issue titles of existing issues - that gets very confusing. Best create a follow-up issue for the problem and just link it here.

fago’s picture

Status: Fixed » Closed (fixed)

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