Closed (fixed)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Core
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2011 at 15:10 UTC
Updated:
23 Oct 2013 at 01:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
geerlingguy commentedSame here. I'm hitting this problem on most pages on my site.
Offending code:
Also, I have error reporting set to show no errors on screen, and this error message shows up at the bottom of my pages, after the closing
</html>tag. See: http://www.midwesternmac.com/Comment #2
geerlingguy commentedSetting to needs review. Patch fixes the main issue, but I don't know if that's the ideal solution.
Comment #3
fagoThe solution is fine, though I think this can check should be improved anyway. Does the attached patch fix it for your too?
Comment #4
pillarsdotnet commentedI can confirm that the patch in #3 also makes the error go away.
Comment #5
pillarsdotnet commentedRe-rolled patch to correct for some fuzz.
Comment #6
fagothanks, committed.
Comment #7
enrikito commented7.x-2.0-alpha5
PHP Fatal error: Call to undefined function user_access() in rules/rules.module on line 1006
"on line 1006"
Comment #8
pillarsdotnet commented@enriktito -- The 7.x-2.0-alpha5 version does not have this fix. You need to get the current development version from the Git repository.
Comment #9
enrikito commentedthanks
Comment #11
SilviuChingaru commentedI think there is the same error in latest version. This is the output in my error_log:
[Wed Feb 08 22:28:03 2012] [error] [client 89.137.*.*] PHP Fatal error: Call to undefined function user_access() in /drupal/sites/modules/rules/rules.module on line 1084, referer: http://everypage_of_my_site as anonymouse userCurent config:
D 7.12
Rules 7.x-2.0
Debug mode on
Comment #12
alexandersluiter commentedI'm seeing the same thing. I'll see if I can find a fix unless someone else comes up with something before me. It's only when I have "cache blocks and/or cache pages anon visitors" on in the performance section. I'd really like to use Drupal's caching methods due to the amount of traffic on the site and load times. I've found that I'm seeing it every time someone hits the home page after they've been to the site...weird...I know.
My setup:
Drupal 7.12
Rules 7.20
A Bunch of other modules...
Web Server:
Apache 2
PHP 5.3.10 (cli)
MySQL 5.5
Mod_security 2.6.3
Comment #13
pillarsdotnet commentedrestoring issue title
Comment #14
fagoPlease, always try the latest dev version and make sure the bug still exists there. If so, re-open.
Comment #15
presleyd commentedI'm seeing this error (except on line 1194) with the current dev version.
Comment #16
fonant commentedI'm getting this too, line 1194. Started when I disabled a load of modules (using Admin Menu's "disable developer modules") and then found I had to re-enable many for Drupal Commerce to work.
A visit to http://sitename/admin/modules seems to have cleared the problem.
Comment #17
Fred75 commentedHello,
I have the same problem, among others, with both the regular (7.x-2.1) and dev (7.x-2.x-dev) versions of Rules + release 7.12 of core.
See here for a more detailed account: http://drupal.org/node/1068168#comment-5870496
Cheers,
Fred
Comment #18
mbelos commentedI ran into this on a production site. I set the "Show debug information" setting to "Never" on this page: /admin/config/workflow/rules/settings
Since the site is on production, I didn't need to show debug information anyway... Hope this helps some of you!
Comment #19
Anonymous (not verified) commentedI got it, too. In current dev it's line 1190: rules_show_debug_output(). It's very common - see this Google query - so I raise priority.
How about using function_exists('user_access') and completely disable debug output in case no access checks are possible? Just to get rid of it quickly...
Comment #20
Anonymous (not verified) commentedComment #21
Anonymous (not verified) commentedComment #22
boabjohn commentedAlso getting this problem. What can I provide to assist in debug? We're running:
1. Latest Rules7.x-2.x dev
2. A permissions module called field_permissions
3. Variable
...nothing else too tricky.
The patch in #21 looks stalled?
Do the maintainers feel this issue was resolved back in #8?
Comment #23
mitchell commented@boabjohn: Did you test the patch?
@Shnapoo: It's probably best you create a new issue and backreference this one so that each commit is atomic. I'll leave this issue open in the meantime for any incoming test reports.
Comment #24
Anonymous (not verified) commentedThe commit #6 was refactoring, not solving the issue at all. At #0 the OP has already shown the solution. At #21 I simply reinvented it, because it wasn't handled properly for over a year.
So, I will not open a new issue. This one is not solved as yet, has no relevant commit.
Comment #25
mitchell commented@Shnapoo: Thank you for clarifying. I didn't see that #6 was only a refactoring. #21 looks to be what's needed.
I'd be happy to test if I knew how to reproduce this, but that's where we're at now. Tests wanted.
Comment #26
Aleksander Mlinšek commentedrules_exit.patch queued for re-testing.
Comment #27
andypostConfirm that bug exists in 2.2
Comment #28
Krakott commentedTo mbelos
(#18 Posted by mbelos on May 1, 2012 at 6:24am)
Thanks a lot, it worked for me !
This error only appeared in IE, not in Firefox
Comment #29
gunwald commentedI have the same problem:
I am using Rules 7.x-2.3. The version is newer than the patch, what am I supposed to do than?
The strange thing is, that I am running that site for a long time and the error occurs (as far as I see) as from today. It seems to break the cron.
Comment #30
fagoLooks like the problem is rules_exit() not taking into account that it runs for cached page requests. Please test whether the attached patch does the trick.
Comment #31
denix commentedI agree, same problem. I start getting the error when using cache for anonymous.
Denis
Comment #32
fagoalthough no testers reported whether #30 does the job, I think it does, so I went ahead and committed it.
Comment #34
WebSinPat commentedthe patch in #30 seems to have made my error go away.
rules 7.x-2.3