After updating this weekend to Domain Access 6.x-2.0, we found our sites running Domain Access were broken. We were getting fatal errors about check_url() not being defined in domain.module at line 1042.
We removed all the Domain Access related modules, reinstalled them, and ran update.php. That seemed to fix the problem.
I'm posting this here in case any one else is experiencing the same problem.
Comments
Comment #1
agentrickardAlready committed a patch. Please search the queue under 'fixed' and Drupal 5.
Comment #2
sahlborn commentedI encountered the same error when updating from 2.0rc9 to 2.0. But I wasn't able to solve it, except when removing the function
check_url(...)at line 1042 in domain.module, which I think is not a good solution though...Comment #3
hoza commentedI just upgraded Domain Access from rc9 to 2.0 and had this same error for line 1042 of domain.module. It does appear to affect Drupal 6, unless I'm not updating something else correctly. (Ref: Use of check_url() breaks caching)
I've done this edit at line 1042 (copied line and removed the check_url() function) and everything works fine now for me, although I feel it's a hack too, sahlborn:
Is there something else I should be doing to fix this better?
Thanks!
Paul
Comment #4
giorgoskupdated from rc9 to 2.1 and encountered the same problem
solution in #3 works for me
is there any reason for the usage check_url ?
Comment #5
agentrickardcheck_url() is a security function to ensure that only valid urls are used.
This does not occur in Drupal 6.x under normal conditions (e.g. 'normal' mode page caching or disabled caching).
What else are you doing that might cause this? Alternative caching? Other modules that use custom_url_rewrite_*?
Does this occur on _all_ pages for _all_ users, or on specific pages for specific users?
Comment #6
giorgosknot any module that I know is using custom_url_rewrite_*
I will need to reenable the module and try to debug the error
Comment #7
agentrickardThis bit us in D5 because hook_init() isn't loaded on cached pages, but that is not the case in D6.
common.inc isn't loaded until BOOTSTRAP_FULL, so anything that prints output before then might be the cause.
Comment #8
agentrickardComment #9
giorgoskon update to 2.2
#3 solved the problem again
how to I start debugging this ?
Comment #10
giorgoskIt might have to do with the in my settings.php
I erased (after update with previous fix) and site works OK
I think domain now uses http://drupal.org/project/url_alter and had not realized
while I had this enabled on my site
Comment #11
agentrickardYes. Does switching to url_alter module and removing the code from settings.php solve the problem?
Comment #12
giorgoskwell I can't tell if the update would be OK because I already had run the update with the fix above
but switching to the url_alter and dropping the code from within the settings.php seems to produce no errors/warnings
I assume that this was the problem then
Comment #13
agentrickardI think so. It was a condition I was never able to replicate, which is why the code never changed.
Comment #14
giorgoskstill get this error on updating just the domain module to 2.3
don't know what to look for ?
Comment #15
agentrickardThis is not a DA problem, AFAIK. It's a conflict with some other module or custom code. Did you switch to using URL Alter? Do you still have custom code in settings.php?
Did you get this error when running update.php?!?
Comment #16
giorgosksince last update
URL alter has been part of the installation
and the custom code from settings.php has been erased
why is it not seeing the check_url function ?
is that function part of URL_alter ?
immediatelly after putting the 2.3 files in place (before even running update.php)
trying to access ANY page of the site gives the above error
Comment #17
agentrickardcheck_url is in common.inc (see #7).
If you have alternative or advanced caching turned on, this would make sense. Neither are supported.
Comment #18
giorgoskon admin/settings/performance
Normal caching
page compression
js compression
css compression
are enabled
no other caching module used
are those compatible with domain ?
Comment #19
agentrickardYes, though CSS and JS compression may not work if you use Domain Theme.
I simply cannot replicate this error. Never could on D6. So that suggests custom code or other modules.
Comment #20
agentrickardYou might look through your modules and see if any implement hook_boot(), which could be an issue. But if that were the case, the Performance page would give you a warning.
Comment #21
Ibn al-Hazardous commentedThe hook_boot tip is spot on. I got this error trying to upgrade from 2.0-rc8 to 2.5 - and I have two modules that implement hook_boot: devel and shared sign-on (I know it's insecure, I'll switch away real soon now) - and it seems it stumbled on shared sign-on (works fine with just devel enabled).
Since the problem module for me is emphatically unsupported, I'd say this isn't a big issue. GiorgosK, are you using the same module? To check for other problematic modules, you could run the following command (in your sites/all/modules folder):
user@server# grep _boot * -R | grep functionIt'll return all implementations of hook_boot for you.
Comment #22
agentrickardDevel doesn't throw this error for me, so I suspect SSO.
Comment #23
agentrickardFixed this recently.