Family Tree
Dillahunty Family
Darla Baerg
Ideah Agency
I Get To!!
Craft a Craft
Peachbush Enterprises
Peachbush Gallery
Drupal 5.0 upgrade - call to undefined function module_exist()
Now that the great Drupal 5.0 is out, I've been moving various production web sites over to it. Bruce's Brain has been running on the beta for a while, so you don't really see changes here. Other sites all moved over just fine.
Then I hit my 'main' web page (Craft A Craft) - few teething pains... few problems tracking down modules that I had used that have been upgraded, etc.
Then it works... great. But I want to try the new Garland theme (I'll modify it some, but its a good start, I think, for what I want). As soon as I switched themes, I get:
Fatal error: Call to undefined function module_exist() in <path>/includes/common.inc(1342) : eval()'d code on line 3
This proved really hard to debug... I couldn't get much more information out of it. It seemed to be related to a block or modue, but.. Even modifying the code in common.inc to print more information, I never succeeded in seeing exactly what was called that issued the error (that's just my lack of php knowledge, I'm sure).
Finally realized that its telling me that the "module_exist()" call doesn't exist. That's a documented change in modules for Drupal 5.0, but all my modules have been updated. I egrepped them and made sure there wasn't any calls that got missed. Nothing.
Finally found this thread that seemed related... then today a posting that found the issue for me!
Reproduced below:
You can find php posts, blocks and block visibility settings by executing the following queries (SQL tab in phpmyadmin).
PHP posts:
SELECT n.nid, n.title FROM node n INNER JOIN node_revisions r ON n.vid = r.vid WHERE r.format = 2;
Custom PHP blocks:
SELECT * FROM boxes WHERE format = 2;
Block visibility settings:
SELECT * FROM blocks WHERE visibility = 2 AND status = 1;
I ran the queries and found that I had some old Google Adsense ad blocks that I had manually created from way back when (before the adsense module created them automatically for you) that included the module_exist call. These blocks were disabled, so I thought they would not execute... that raises another question, but removing them made things work!
Thank you Heine!
- bdillahu's blog
- Login or register to post comments