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

agentrickard - August 17, 2009 - 17:24
Category:support request» bug report
Priority:critical» minor
Status:active» needs review

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.

AttachmentSize
551532-function-exists.patch 1.03 KB

#2

jseltzer - August 17, 2009 - 17:59

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

agentrickard - August 17, 2009 - 19:20
Title:Getting error when enabling module» Remove module_exists() from settings.custom_url.inc

Better title.

#4

agentrickard - August 22, 2009 - 21:36
Status:needs review» fixed

Committed to HEAD and 5.x

#5

System Message - September 5, 2009 - 21:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.