Active
Project:
Subdomain
Version:
6.x-1.4
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2008 at 01:33 UTC
Updated:
30 Nov 2009 at 11:43 UTC
I get a Fatal Error: Call to undefined function subdomain_url_rewrite_inbound() ...in settings.php.
Don't understand this error since the module is installed and the function is there.
I'm confused. The subdomain_url_rewrite_outbound() works fine.
Comments
Comment #1
setvik commentedCheck the spelling on both functions: are they both spelled correctly?
Can you paste the relevant section of your settings.php file in a comment below?
Comment #2
zahor commentedModified to stop fatal errors (with function_exists):
Comment #3
brandontrew commentedThis code worked at last!!!!
Comment #4
held69 commentedYep works!!
Comment #5
doublejosh commentedummm..... doesn't seem right to just remove that from the subdomain settings.php additions.
I added the check just to get the module limping along and found the outbound rewrites to work, but the inbounds do not point to the node, which would make sense when commenting out that function reference in the settings.php file.
Helps?
Comment #6
jp.stacey commentedI've done a bit of digging, and it seems it depends on what other modules you've got enabled.
Here's how you can dig yourself:
View the source in that page. You should see a backward look at what function called what function, called what function etc. Look at what module tried to call the function that little bit too early. In my case it was og_user_roles, and here's my sample output:
You can see the
custom_url_rewrite_inboundhit, followed by some Drupal internals, followed by ahook_bootimplementation for og_user_roles.The problem happens in Drupal's bootstrap phase. In this phase, Drupal only brings in the modules it really needs: these are identified by having a
hook_bootimplementation.Now, there does exist a
subdomain_boot. However, it's only brought in by Drupal when that module is being bootstrapped, and by default modules get summoned in alphabetical order. Hence og_user_roles tries to rewrite a URL and keels over.Solution: open a MySQL prompt and type
UPDATE system SET weight = -200 WHERE name = 'subdomain';You can set the weight to any negative number, as long as it weights the module above whatever's calling it. To see what the offending module is weighted at, typeSELECT WEIGHT FROM system WHERE name = 'og_user_roles';, replacing that with whatever module came out of thedebug_print_backtrace.If this works, then this isn't on its own a bugfix for the module: it also needs to go into the module's
.installfile, as it's necessary for thehook_boottrick to work properly!Comment #7
druvision commentedI got this error on the D5 dev version today. The issue is that subdomain_url_rewrite_inbound() is only defined on sudbomain.module.
Remediation might be to modify the settings.php code in README.txt, or to modify the steps on README.txt so that the subdomain module will be activated earlier.
Amnon
-
http://levavie.com, http://hitech-dolphin.com