Closed (fixed)
Project:
Browscap
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
1 Mar 2012 at 05:51 UTC
Updated:
2 Apr 2012 at 04:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
venusrising commentedThis is printing in our feed and at the bottom of the page
Comment #2
venusrising commentedIf permission for admin are not selected to bypass it throws an error.
It also throws an error to the RSS feed for the homepage
Comment #3
rfayI have this as well. Drupal 6.24.
Comment #4
rfayWorkaround: Uncheck "Enable user agent log" in the settings.
Comment #5
devin carlson commentedI think I finally managed to figure this out.
hook_exit()runs at the end of each page request and runs even for cached page views. If the page is cached then Drupal may still be in bootstrap mode and certain modules may not yet be loaded (in the case of this error, user.module).I can think of a few ways to fix this, but I'm not sure which fix is best.
drupal_load()to ensure that user.module is loaded when trying to check user permissions (good but I'm not sure how much additional load this create on each page request).module_exists('user')and allow monitoring to be bypassed when user.module is loaded (on uncached pages) and record every user agent (even if they have bypass permissions) when they view cached content.If anyone has any suggestions, I'd very much appreciate them. In the mean time, the error can be bypassed by disabling user agent logging as rfay mentioned.
Comment #6
izmeez commentedSame issue with 6x-1.4 on login page, using logintoboggan. Revert to 1.3 no problem.
imho, with WSOD this is critical to using this update of the module.
Comment #7
devin carlson commentedAfter giving this some more thought, I think that the best approach would be to attempt user agent recording both during init() and during exit(). That way, "processing" such as checking for user access, can occur during init() before recording the user agent on non-cached pages but recording would also happen during exit() to catch user agents visiting cached pages.
In order to prevent duplicate recordings, a static variable in a helper function could track if recording has already happened in init() and prevent another recording from happening during exit(). This will still prevent authenticated users from being accidentally recorded as an authenticated user will not get served a cached page.
The only "issue" with this implementation is that giving anonymous users the ability to bypass user agent monitoring will not work on cached pages, but, to my knowledge, there is no way around that and there isn't much point to not recording anonymous users.
Comment #8
devin carlson commentedCommitted to 7.x-1.x.
Comment #9
devin carlson commentedBackport of #7.
Comment #10
devin carlson commentedCommitted to 6.x-1.x.
Please test the latest git checkouts (or -dev releases after they are built) and to confirm that this issue is solved.
Comment #11
izmeez commentedI can confirm the new 6.x-1.x-dev update appears to work with no more WSOD.
Comment #13
gransar commented@rfay there is no settings anymore... this error prevents dashboard from loading..
Comment #14
rfay@gransar you don't mention what version you're using. This should be resolved in all current versions.