Fatal error: Call to undefined function: block_list() in .../theme.inc on line 935

kronikel - August 6, 2006 - 13:59

I've just upgraded my drupal installation to the new release (from 6.x). But there seems a problem and I couldn't over come it no matter what i did. Please help.

There is the same error on every page.
Fatal error: Call to undefined function: block_list() in .../theme.inc on line 935

What is the problem?

Fatal error: Call to undefined function: block_list() in .../the

tnaberhaus - August 15, 2006 - 20:08

Did you discover a solution to this problem? I am having the same difficulty in attempting to upgrade from 4.6.9 ==> 4.7.3.

I'm also witnessing the same

cation555 - August 17, 2006 - 15:53

I'm also witnessing the same problem. Any solutions?

Possible cause and fix

thewebtailor - August 18, 2006 - 20:33

I had this problem too, when doing an upgrade step by step through from 4.4.0 to 4.7.3 - the upgrades mostly worked, and those that didn't I could replicate manually from within MySQL. But when I fired up 4.7.3 I got this error about block_list() being undefined.

It turned out to be a problem with the database - I knew it couldn't be the files, because I'd done a clean install of all the files.

In the system table, something had screwed up the filename field, so that each filename had a duplicated directory, like this:

"/modules/modules/block.module"

This meant that the system table couldn't be used to point drupal at the necessary modules, hence block_list() never gets defined.

The system table in my old site was fine, so one of the update steps must have done this. Correcting the block entry in the sytem table meant the site worked again. Probably should correct every entry in the table, though...

Thanks

tnaberhaus - August 31, 2006 - 17:43

This was the problem and correction I was looking for.

Same problem but the above fix doesn't work

tiggman - September 21, 2006 - 22:27

I'm running into the same issue but the above fix doesn't seem to apply. I see no duplicate entries in the Systems table. Any other ideas anyone?

- TD

Check the script

jwm - October 11, 2006 - 02:41

Check to make sure you typed update.php, rather than upgrade.php. The documentation calls the process an upgrade, consistantly, and it's not an easy brainfart to spot once it's in your location bar. For the whatever→4.7 upgrade there is enough database brokenness that you won't see a sensible 404 error, either.

same?

turco - October 16, 2006 - 22:54

The problem survives still... What's wrong?

check your modules directory

firstov - October 21, 2006 - 01:31

check your modules directory to make sure it does not contain Drupal core module files twice (old and the new versions for instance).
I've had this issue when upgrading Drupal created modules/backup folder and moved *.modules there. Then unpacked fresh version of core files into modules folder. As the result Drupal had modules/backup/some.module and module/some.module in it's system database producing this error.
www.firstov.com

My solution for this.....

barnetda - October 22, 2006 - 18:52

I don't know how much this will help, but....

I do not have direct access to my hosted MySQL DB, so I had to use their PhpAdmin web forms, and cut/paste the information from the database.4.0.mysql file.

When I viewed my new home page, I got this same "Call to undefined function: block_list".

For some reason, the inserts into the "system" table contained new line (\r\n) characters in the names of some of the filename entries (i.e. modul\r\nes/block.module instead of modules/block.module).

I was unable to use phpadmin to delete the bogus entries, so I did:
1. drop table system;
2. cut/paste table create from the database.4.0.mysql file
3. more carefully cut/pasted the lines for inserting module entries into the "system" table.

After I was done, everything is working like a charm.

i did something else, but

valentin@irata.ch - January 15, 2007 - 20:54

i did something else, but seems to be the same problem, other solution...
in includes/theme.inc
I change the function drupal_load like this:

<?php
function drupal_load($type, $name) {
  static
$files = array();

  if (isset(
$files[$type][$name])) {
    return
TRUE;
  }

 
$filename = drupal_get_filename($type, $name);
 
$filename = trim( $filename );//<-- here add a trim ;)

 
if ($filename) {
    include_once
"./$filename";
   
$files[$type][$name] = TRUE;

    return
TRUE;
  }

  return
FALSE;
}
?>

And now it works fine for me

This worked for me...

Owen Barton - October 31, 2006 - 08:36

Try rebuilding the system table. Note that you will have to renable any contrib modules/themes once you have done this (contrib module data/settings won't be harmed, however).

DROP TABLE `system`;
CREATE TABLE system (
  filename varchar(255) NOT NULL default '',
  name varchar(255) NOT NULL default '',
  type varchar(255) NOT NULL default '',
  description varchar(255) NOT NULL default '',
  status int(2) NOT NULL default '0',
  throttle tinyint(1) DEFAULT '0' NOT NULL,
  bootstrap int(2) NOT NULL default '0',
  schema_version smallint(3) NOT NULL default -1,
  weight int(2) NOT NULL default '0',
  PRIMARY KEY (filename),
  KEY (weight)
)
DEFAULT CHARACTER SET utf8;
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/block.module', 'block', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/comment.module', 'comment', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/filter.module', 'filter', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/help.module', 'help', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/menu.module', 'menu', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/node.module', 'node', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/page.module', 'page', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/story.module', 'story', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/system.module', 'system', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/taxonomy.module', 'taxonomy', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/user.module', 'user', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/watchdog.module', 'watchdog', 'module', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('themes/engines/phptemplate/phptemplate.engine', 'phptemplate', 'theme_engine', '', 1, 0, 0, 0);
INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('themes/bluemarine/page.tpl.php', 'bluemarine', 'theme', 'themes/engines/phptemplate/phptemplate.engine', 1, 0, 0, 0);

Thanks for the post. This

2root4u - February 15, 2007 - 04:10

Thanks for the post. This resolved my problem. My system table showed no corruption as described above, but this system table rebuild worked like a champ.

how to rebuild table

proficient - May 19, 2007 - 10:02

I too have the same problem. sorry for the ignorance,

how to rebuild the system table using phpmyadmin.

Thanks in advance

I'm having the same problem,

high1memo - March 13, 2007 - 12:35

I'm having the same problem, but I'm using drupal 5.1. My system table doesnt look like anything is duplicated, but I guess I can't use this script. Any ideas what I would need to do?

me too

selwynpolit - July 22, 2007 - 04:41

I tried updating from 4.7.6 and got the same problem. I tried copying themes from old install and new. Also tried the sql code to rebuild the system table. I can get drupal sort of running but it clearly is very confused about themes.. Ideas?

i am having the exact same

vomc8one - July 22, 2007 - 21:57

i am having the exact same issue and just responded here:
http://drupal.org/node/159872#comment-254621

followed all the advice i could find but no help. so my site is still down...

- j

i fixed it finally. problem

vomc8one - July 23, 2007 - 15:04

i fixed it finally. problem was that adsense was throttled due to site congestion, creating fatal php errors by a block that called print adsense_display();. so i rebuilt the system table after backing everything up and then disabled the block in question to get things going again
- j

-------
http://quilted.org

I had the same problem, but

portaporpoise - August 24, 2007 - 16:43

I had the same problem, but I was going backwards (from 5.2 to 4.7.7). I ended up rebuilding the system table first, which helped some. Then I had to go in and manually drop about 20 v5.2 tables that were tripping up v4.7.7 when I ran update.php.

How to re-enable contrib

nanny1979 - September 28, 2007 - 10:53

How to re-enable contrib modules/themes? Urgent help would be much appreciated

I'm having the same problem.

johnnyRoyale - July 25, 2007 - 09:18

I'm having the same problem.

I've tried using easyPHP 1.8 install with drupal 4.7, and I've tried using the easyPHP 2.0 beta with drupal 5.1 but I get the same problem with both.

I've set up my database with SQLyog creating a user and database as per the instructions provided with Drupal.

It feels like it might be something to do with my database. I've had a bit of a poke around and I can't find a 'systems' table anywhere. Can someone tell me how I can access it?

This is my first time using the open source family of programs so go easy on me!

Fatal error: Call to undefined function block_list()

ursnagi1 - November 16, 2007 - 09:33

Hi ,

I'm new to drupal technology and developed a website using Apache, MYSQL and PHP.

When i tried to host my website through siteground.com, got the following error.

Fatal error: Call to undefined function block_list() in /home/letusres/public_html/includes/theme.inc on line 936

Please make someone help with this issue ASAP.

Nagendran Neelamegam
NJAY Consulting Company

Try to enter valid $base_url

neochief - February 20, 2008 - 02:07

Try to enter valid $base_url in your configuration file (settings/default). It can really helps. It did for me :)

Fatal Error....

TravieMo9 - March 17, 2008 - 20:48

There seems to be several reasons for this problems and several solutions. Here is what it took for me and maybe it can help someone:

I solved my problem. I looked at the Drupal Database and I noticed the repeated use of vti_cnf in the paths to files. I knew I had seen that someplace before. They are the folders that are placed in each directory by FrontPage. I had had a couple of FrontPage websites on my hosting and had FrontPage Server Extensions turned on. I replaced all sites with ones that didn't depend on FrontPage Extensions and I turned them off. But for some reason the vti_cnf got placed in the Drupal Installation and then into the database. I cleaned all of these out of my folders wherever they were, uninstalled Drupal and reinstalled it. Now things work fine. Gotta love Micro...you...know....who!

database and tables exist, empty tables

bcswebstudio - March 27, 2008 - 06:42

Thought I'd weigh in.. Same error, but turns out my issue (and resolution) had to do with mysqldump returning only the table structures, not the data. So I was hitting an empty System table (among all others..). In my specific case, it turns out there mustn't be spaces between params and associated value in my mysqldump db export:
NOT
mysqldump -u my_user -p -h myhost.com my_db_name > drupal47.sql
BUT
mysqldump -umy_user -p -hmyhost.com my_db_name > drupal47.sql
once I fixed that, export was chock full o' data, and things were smooth sailing.
--
..happiness is point and click..

Problems in themes.inc

rogerwebb - March 31, 2008 - 14:47

I'm working with drupal 5.5 and have this problem

Fatal error: Call to undefined function: block_list() in /homepages/36/d186685211/htdocs/RbA3/includes/theme.inc on line 1018

like so many others

Previously i had experienced error 505 after updates of admin functions so i wonder if the common denominator is 1and1 as a supplier?

The different versions of drupal complicate the finding of a common cause in Drupal

Solved by reimporting the database with gzip

globaldrifter - April 30, 2008 - 05:53

I was transferring a site from one server to another (not an upgrade; all configurations identical) and ran into the same problem. Following the hints above, I discovered that I too had an empty system table. I re-imported the database, this time using gzip, and all is well. I'm guessing the original export/import process got corrupted or just timed out.

Thanks for the hints!

Check $base_url

The Running Man - August 21, 2008 - 21:10

This was an issue for me when moving my site between hosts.

To echo neochief - be sure that you have a valid base_url set in the .htaccess file in the root directory. This solved the issue for me. If in doubt, start by commenting out the $base_url line and then go from there.

Additional items:
- make sure entire database has imported correctly. at minimum - check that you have the same number of tables in source and destination.
if using PHPAdmin - be sure to select structure and data when exporting.
- if you are having problems importing data, try exporting a few tables at a time and then importing them that way. you could also try increasing the timeout limit for PHP on your webhost (if that's an option)
- be sure to change the database access settings in your 'settings.php' file

Forgot to turn custom theme off

stackpool - June 3, 2009 - 15:50

This happened to me... but I'd just forgotten to select the Garland theme before disabling my modules. Just a dumb mistake, but it had me in a flap until I restored the database and realised what I'd done.

 
 

Drupal is a registered trademark of Dries Buytaert.