Remove module_exists() from settings.custom_url.inc
jseltzer - August 17, 2009 - 16:34
| Project: | Domain Access |
| Version: | 6.x-2.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Description
Installing Domain Access module for the first time. Followed the instructions in the install.txt. After making the additions to the settings.php file, went to enable the Domain Access module and got the following error:
Fatal error: Call to undefined function module_exists() in /usr/www/users/aic1331/sites/all/modules/domain/settings_custom_url.inc on line 42
Seems to be looking for the domain source module - which I haven't enabled yet. I didn't see any existing issues like this. Any idea what might be causing this?
Drupal 6.13
MySQL 5.0.67
PHP 5.2.9

#1
Well, it is caused because module.inc hasn't been loaded yet. But this doesn't happen in normal situations (else we would have found this problem long ago).
Something is calling settings_custom_url.inc in an unexpected sequence, or you have another module outputting links before Drupal finishes bootstrapping (which is very odd).
In any case, the following fix should solve the issue, and we could use this instead. However, you may have links that do not work correctly, so you would have to track down what module was calling the function so early in page load.
#2
I disabled every module and still get the error. The patch does work - thanks. But I guess I'll try a reinstall to try and sort out what the issue might be - since I think it might cause other issues down the road. Just starting to build the site - so it's no big deal.
Thanks,
Jared
#3
Better title.
#4
Committed to HEAD and 5.x
#5
Automatically closed -- issue fixed for 2 weeks with no activity.