On a Drupal 6 site where I had copied over a database to be used with a freshly checked out tree, I suddenly got this fatal error which stopped any page from loading:
Fatal error: Call to undefinedfunction: block_list()in .../theme.inc on line 935
I'm not sure how it happens. And even after it happens, it's not always immediately a problem. It can be a problem that manifests itself when migrating or copying a database from one site to another. And for some reason, the exact same database worked on another site.
In my case, the problem was the filenames for some core modules and themes and you can see if that's your problem by running this query:
SELECT count(*) FROM system WHERE filename LIKE '%modules/modules%' OR filename LIKE '%themes/themes%';
If that returns anything (like a filename like 'modules/modules/block/block.module') then you have a problem which you can fix by running:
UPDATE system SET filename = replace(filename,'themes/themes','themes');
UPDATE system SET filename = replace(filename,'modules/modules','modules');
You can get a similar error when editing the menu/admin menu:
"Fatal error: require_once() [function.require]: Failed opening required 'modules/modules/menu/menu.admin.inc' (include_path='.:/XXX/lib/php/pear') in XXX/includes/menu.inc on line 346"
This is caused by the menu_router table being corrupted in a similar way. The solution is to run this query:
UPDATE menu_router SET file = replace(file, 'modules/modules', 'modules');
Recent comments
1 year 11 weeks ago
2 years 3 days ago
2 years 1 week ago
2 years 3 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago