It is probably called by the features integration, but it should be called when building data (that should be obvious). But line 56 tells me that Rules doesn't like to alter his stuff (third argument shows wether alter hooks should be called).

$defaults = rules_gather_data('rules_defaults', 'all', FALSE);

Can anyone explain me why?

Comments

franz’s picture

Status: Active » Needs review

Just so you know, I've removed the third argument and so on so far it is working. I'm working with features, and I had to change my own features-exported rules on an alter implementation to fix Workflow State ids (as we export rules from one installation into another, sids may be different).

fago’s picture

Title: hook_rules_defaults_alter is not called on right time » add hook_rules_defaults_alter()
Category: bug » task
Status: Needs review » Active

I don't think there is hook like that in d6? In d7 there is + it makes sense to me, so feel free to roll a patch.

franz’s picture

Status: Active » Needs review
StatusFileSize
new633 bytes

Yes, there is. Actually, would be more appropriate to say, there is support for it. Well, AFAIK the patch is actually just changing that argument, but I think there should be an appropriate testing. For me it worked well so far.

Status: Needs review » Needs work

The last submitted patch, rules.rules_defaults_alter.patch, failed testing.

klausi’s picture

Version: 6.x-1.3 » 6.x-1.x-dev

Patch does not apply, see http://drupal.org/patch/create

franz’s picture

StatusFileSize
new841 bytes

yeah, didn't know patches made with diff couldn't be used by simpletest.

franz’s picture

Status: Needs work » Needs review

ops...

Status: Needs review » Needs work

The last submitted patch, rules.rules_defaults_alter.patch, failed testing.

franz’s picture

Status: Needs work » Needs review

#6: rules.rules_defaults_alter.patch queued for re-testing.

fago’s picture

Status: Needs review » Needs work

We'll also need to the add in the according API docs in the rules.api.php file.

mstef’s picture

Works for me.

franz’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev

At this point, this should get rolled to D7

mitchell’s picture

Status: Needs work » Postponed

Old issue. Waiting on:

We'll also need to the add in the according API docs in the rules.api.php file.

franz’s picture

Status: Postponed » Needs work

If this is set to postponed, we will wait forever.

klausi’s picture

Status: Needs work » Postponed (maintainer needs more info)

We have hook_default_rules_configuration_alter(), what is missing here?

mitchell’s picture

Component: Provided Rules integration » Rules Core
Status: Postponed (maintainer needs more info) » Fixed

Marking as fixed as per #15. Please reopen if this change isn't right.

Status: Fixed » Closed (fixed)

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