Hello,

After enabling rules module I'm getting a white page with this error on clicking a short url (with no forwarding to actual link)

Fatal error: Call to undefined function user_access() in /path/to/drupal/sites/all/modules/rules/rules.module on line 1190

Is there any configuration I need to do with Rules?
Thanks in advance

----------------
Dinajpur - Rangpur

CommentFileSizeAuthor
#2 rules_play_nice_with_shurly.patch583 bytesnathanhilbert
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

It sounds as though you may have a rule set up to execute on every page that requires an access check. Since Recurly redirects on hook_boot() (which is before a lot of Drupal sub-systems are loaded, for efficiency), these access checks may not process correctly. You should check your Rules that are set up to execute on every page and try to narrow them down to particular URL paths where they are needed.

nathanhilbert’s picture

Rules is calling a hook_exit for all pages, which checks user access that is not available in _boot. This patch for rules verifies that user_access function is available.

quicksketch’s picture

Project: ShURLy » Rules
Version: 7.x-1.0-beta2 » 7.x-2.x-dev
Component: Code » Rules Core
Category: support » bug

Since Recurly redirects on hook_boot()

I meant to say "Since ShURLy redirects" here.

Thanks @nathanhilbert for your patch. This should be moved to Rules module.

rv0’s picture

Status: Active » Reviewed & tested by the community

Seems fine to me.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, rules_play_nice_with_shurly.patch, failed testing.

fago’s picture

Status: Needs work » Closed (fixed)

afaik that's fixed in the latest version.

fago’s picture

Issue summary: View changes

added more debug information