I am running three sites (one in Italian, one in German, one in Dutch) of a common Drupal 4.6.0 code base. I have been working away for two days configuring them, and am just ready to go live, when all of a sudden my Italian site completely stops working with the following message:
Fatal error: Call to undefined function: drupal_set_html_head() in /home/gmpmprdg/public_html/460/modules/jsdomenu/jsdomenu.module on line 107
I wanted to post the code in this post (in php tags) - but every time I try to do so I get "Terminated because of suspicious input data"!!!!
Bizarrely, the German and Dutch sites continue to work fine, and off an identical code base obviously. I am completely mystified as to why I should not be able to find a Drupal core module all of a sudden - and would be very grateful if anybody had any ideas.
Many thanks, JG
Comments
jsdomenu.module is not a core module
jsdomenu.module is not a core module.
My guess is that jsdomenu.module has a problem with Drupals cache function. The "Call to undefined function" error is a indication of this.
If my guess is correct then you have three choices:
* Stop using the jsdomenu.module
* Stop using the cache function
* Fix the jsdomenu.module so it support Drupals cache function.
Where do I put stuff to load things in HEAD?
Thanks for the tip - I will investigate this. I know that jsdomenu is not core, but I was referring to drupal_set_html_head, which is called to load references to javascript files in HTML HEAD.
In jsdomenu, drupal_set_html_head is called from hook_init - is this not the appropriate place? I notice that there is apparently a possibility to put it into hook_menu - is this right? Instinctively, hook_menu seemed a bit odd. Also, I don't really understand the $may_cache variable - if I call hook_menu how should I set this?
From the code.module
Here are one example from the code.module.
To learn more about Drupals hooks etc. go to http://drupaldocs.org/.
(I put in "foobar" so Drupal.org would not terminated my comment.)
That didn't work... but turning cache off did
I tried altering my implementation so that I called hook_menu instead of hook_init; the code now reads:
The jsdomenu_set_head is the function that calls drupal_set_html_head.
This did not appear to make any difference - so I tried turning off caching. And this seems to have worked, so I presume it is due to some kind of problem in the cache implementation.
One missing $may_cache
I think you should change from
to