Closed (outdated)
Project:
Drupal core
Version:
6.22
Component:
database update system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2008 at 08:58 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ksanders99 commentedWe upgraded our site from 4.7 to 5.10 successfully, but any attempt to upgrade from 5.10 to any version of 6 (tried 6.4, 6.3, 6.0) fails because of this error. The site's essentially dead after the upgrade (just white screens except for install.php) and I have to roll back to 5.10.
Our error is:
Sep 5 09:13:16 tshib-sp01 apache2: PHP Fatal error: Call to undefined function _system_theme_data() in /var/www/host.address/htdocs/drupal/includes/theme.inc on line 431
Changing theme variables in settings.php has no bearing on this error.
Comment #2
gerbrand commentedI ran into the exact same problem while upgrading a very simple site (only blog.module enabled) from 4.7 to 5.10 (that went fine) to 6.4.
Additionally, warnings were reported in the apache error.log about missing fields in the cache and url_alias tabled. However these could easily be solved by fixing the tables.
I haven't found a solution yet.
Comment #3
Moozer commentedTo add a third voice, I also have experienced this problem. I have an installation with no custom modules or themes.
I first installed drupal in version 4.3.2, and installed many of the succeeding versions through 4.7.4 to 5.0, then through to 5.11 before attempting the upgrade to 6.5. The error message I receive is:
PHP Fatal error: Call to undefined function _system_theme_data() in /path/to/drupal/includes/theme.inc on line 439
As an aside, I also encountered errors with the url_alias table in the apache logs. It appears as if the url_alias table didn't get the language column added correctly somewhere along the line.
It appears that the relavant lines for url_alias are lines 1229-1231 in modules/system/system.install. Essentially, they run the commands:
* ALTER TABLE url_alias ADD language varchar(12) NOT NULL default '';
* ALTER TABLE url_alias DROP INDEX dst";
* ALTER TABLE url_alias ADD UNIQUE dst_language (dst, language);
I ran those manually but it still didn't fix the "white screen" problem
Comment #4
jsimonis commentedI'm running into the same error.
Before running the upgrade, I turned off all contributed modules, set the theme to bluemarine, etc. Then I completely removed all Drupal 5 files from the directory.
But no matter what I do, I can't get this site to upgrade from 5.12 to 6.6. I just keep getting the same error reported above:
Fatal error: Call to undefined function _system_theme_data() in /home/USERNAME/public_html/includes/theme.inc on line 439Comment #5
jsimonis commentedI just found my error. I'd copied everything into a new database and was upgrading the new database. But the db user wasn't set for the new database.
So instead of getting an error about not having permission to access the database, I got this theme access error instead.
Comment #6
aren cambre commentedI am getting the same error, and it's bogus. Here's how it looks in my php log file:
[30-Oct-2008 22:00:38] PHP Fatal error: Call to undefined function _system_theme_data() in C:\xampp\htdocs\drupal6\includes\theme.inc on line 439I ran Process Monitor to check filesystem operations. system.module is being read several times, and that is what contains the _system_theme_data() function.
I counted 18 operations on that file, 12 of which are reads. So clearly the system.module file is being found.
I get several table missing warnings in my php log file. They are OK because I am trying to upgrade a Drupal 5 database. Those warnings are evidence of a valid connection string. If I break the connection string by screwing up the password, I do not get the table warnings but still get the same _system_theme_data() error.
Don't know if this matters, but index.php fails to fully execute because of missing tables but does not return any fatal errors.
Comment #7
aren cambre commentedNot sure if there is any relation, but http://drupal.org/node/229536 shows where update.php had the same error upon an upgrade. In that example, it was an upgrade from a 4.x database, but that shouldn't cause a WSOD. So I wonder if update.php is getting confused by something in my database and blowing up?
Comment #8
aren cambre commentedphpinfo is attached. Change extension to .html to see correctly.
Comment #9
aren cambre commentedSorry, I see that it's not just XAMPP, so correcting title. And read the thread that gustav mentioned, and it appears this indeed may be a theme error, so putting that back how it was, too.
Comment #10
aren cambre commentedThe plot thickens. _system_theme_data() is being called from line 439 of theme.inc. That call is only made if either of these fails in line 428:
db_is_active() && !defined('MAINTENANCE_MODE').If I change line 428's boolean to
if (1), then it forces use of the code block that doesn't use _system_theme_data(). HOWEVER, I then get this error:[31-Oct-2008 23:24:34] PHP Fatal error: Call to undefined function db_query() in C:\xampp\htdocs\drupal6\includes\theme.inc on line 429.Because the other path also trips an undefined function error, I'm starting to think that this has nothing to do with the theme system except that the theme system's function is the first victim of this bug.
Comment #11
aren cambre commentedI bypassed XAMPP and got the latest Windows MSI installs for Apache 2.2, MySql 5.0, and PHP 5.2. Even after doing that, I still get the exact same errors when attempting an upgrade. So it definitely has nothing to do with XAMPP.
Comment #12
aren cambre commentedFixed it. It failed because my prefix was wrong. Corrected issue title.
It is wrong for Drupal to give a WSOD because of a problem with the database connection.
Comment #13
thoth commentedAnyone else still having this issue? I'm trying to upgrade from 5.12 and am getting a mess of errors ending with this same theme call. I've triple checked the $db_url and I've never used a prefix and it remains as thus:
$db_prefix = '';
I've logged directly into the database using:
mysql -u myuser -p
everything works fine there, I can switch to the db, make sql calls, etc. I've checked under the system table to verify that all the filename paths are correct. I've tried the little
if(1){
trick as well. And I got the same problem with then db_querry() not being defined.
Has the syntax for $db_url changed? It looks the same to me when I do a fresh install. Stumped here. I could post my errors here, but it seems I'm getting the same table missing errors which should be normal for pre-upgrade, and then the
Fatal error: Call to undefined function _system_theme_data() in /var/www/MasterDrupalInstall6/drupal-6.6/includes/theme.inc on line 439
Any suggestions on a fix?
Comment #14
aren cambre commentedDouble check $db_url, too.
Comment #15
thoth commenteddouble, triple, quadruple, quintuple checked that sucker, the username and password are absolutely correct, here's the url without the sensitive parts:
$db_url = 'mysql://myuser:mypass@localhost/mydb';
$db_prefix = '';
And I've checked the database name, username and password, repeatedly, and then double checked, then triple checked, next quadruple checked, and for good measure wrote them on a chalkboard three thousand times and then checked the db_url again. As I said before I've even logged directly into mysql from the command line, with that specific username and that specific password, and that specific database just to verify everything as functioning (select data, sql calls, etc). There are around a hundred other sites on my server using this same instance of mysql (with separate db's of course), so I'm absolutely certain the communication between php, apache, and mysql works, and the database, username, and password all work in conjunction with each other. Same apache, same php, same drupal install, and the other drupal 6 sites are just fine. No database communication issues, no problems whatsoever. In fact I can use this same database in drupal 5 no problems, but as soon as I switch it to drupal 6 its a no go.
Comment #16
cquest commentedI'm facing the same problem while upgrading from 4.7 to 6.6...
All non core themes/modules disabled, site in maintenance mode.
I looked at the code in theme.inc around ligne 439 (where I had the original "Call to undefined function _system_theme_data()" error).
In my case, db_is_active returns true, and I even checked what was going on in db_connect... no problem to connect to the db.
After doing some debug, it looks like it is really a theme problem, more precisely, Drupal 6 switches to the Minelli theme when in update mode (this is done in theme.maintenance.inc around line 35). I've commented the lines that are doing the switch, and the update page is not white anymore :-)
But now it also look like a direct update from 4.7 to 6.6 can't be done because of system.install containing only the update from 5.0 to 6.6... it could same a lot of time to display an error message as early as possible in update.php telling that an update to 5.0 is required prior to update to 6.x. Maybe my white page problem was just linked to that.
I've also looked at UPDATE.txt, no mention of an update to 5.0 prior to 6.x...
I just looked again in Drupal documentation... I found no warning about "super major" upgrades.
Best,
Christian
Comment #17
liberatrThe theme is not loading properly. I experienced this bug upgrading from 6.8 to any higher version. (namely 6.13, but we also tried 6.11 and 6.9 with no success)
I don't know about db_url and db_prefix, as the issue's title suggests, because we are able to run the site on the 6.8 code base with no hiccups.
For those experiencing this problem, I have included a patch to /includes/theme.maintenance.inc that moves a few function calls outside the conditional mentioned in comment #16. Apply this patch or just move the lines above the conditional to get the themes to load properly.
Comment #18
sam_squarewave commentedAfter applying this patch I got a PHP error displayed and fixed with this sql: ALTER TABLE url_alias ADD `language` varchar(12) NOT NULL default ''
Then the white screen came back and I only get: PHP Fatal error: Call to undefined function _system_theme_data() in /home/sagreene/public_html/drupal_samgreene_test/includes/theme.inc on line 459
Please please help!
Comment #19
vinoth.3v commentedme to having the same issue while running update.php :(
Comment #20
mariohmol commentedI've got the same error upgrading 6.x to 6.14. (white screen on update.php and when debuggin problem with _system_theme_data())
Then i applyed the patch and update.php started to show up a normal screen.
After running update.php, the main page still showing a blank page.
So.. working on it!
Comment #21
TallDavid commentedI've updated dozens of sites and this is the first time I experienced the problem described above. There are some good ideas and hints in the discussion above and on other issue pages that led me along a path that ultimately resulted in a successful update of the problematic site. Here are the steps I took that ultimately worked.
Starting point: Drupal 5.1 site that had been offline for a couple of years.
I hope these notes are useful to others!
Note to self: [CFOH.com]
Comment #22
groovehunter commentedsubscribe
Comment #23
cjtemple commentedJust a note for this who may come by this post later on. Today I was performing updates form 6.20 to 6.22 and ran into this problem. I allready had the language column in the url_alias table so I temporarly applied the patch in post #17 and all was well.
Comment #24
rfayComment #25
aren cambre commentedDoes this happen in D7? If so, should be moved up to it for fixing first. (Or D8?)
Comment #26
theatereleven commentedBTW - I received this error today in a unique circumstance, but in case someone else has this happen:
Updated the Drupal Core via Drush like an idiot today, and dumped core in the sites/all/modules folder. So now i had two copies of core.
Had to go into the system table and manually fix a bunch of paths. Then after doing that I ran update.php and the site threw the error talked about here. In this instance, all i had to do was clear cache in Drupal to resolve.
Comment #27
scottmccue commentedToday I upgraded from 6.10 to 6.22 and upon invoking update.php I got the WSOD, and httpd/error_log showed "PHP Fatal error: Call to undefined function _system_theme_data() in /var/www/html/includes/theme.inc".
I found the suggestion offering the "load_modules.patch", edited includes/theme_maintenance.inc directly (after making a copy of the original), and
reinvoked update.php with general success.
I don't say full success because I now get
"warning: array_pop() [function.array-pop]: The argument should be an array in /var/www/html/update.php on line 313."
but that's a warning and not a fatal error. And I get past the WSOD to where I can now do something. Thank you liberatr!
Comment #28
guitarte commentedJust wanted to share my experiences with the update.php WSOD on my local dev environment using the Pressflow Distro of Drupal:
https://bugs.launchpad.net/pressflow/+bug/867785
I am attempting to update the database after installing a new module. I have done the following:
1. remove the old module directory
2. add new module directory in same location
3. login as user 1
4. navigate to mysite/update.php
The site redirects to:
mysite/update.php?op=info
I get the WSOD (white screen of death) and I check my logs to see only this error
Call to undefined function _system_theme_data() in /Applications/MAMP/htdocs/mysite/includes/theme.inc on line 493
I have verified that all of the correct modules are in place for this call (/mysite/modules/system) and it is there. The site does not experience any other problems and runs normally besides not being able to update the database for the upgraded module.
I'm not sure how this fixed it - but I was tweaking my error_reporting setting in my local development php.ini file:
From
error_reporting = E_ALL
To
error_reporting = E_ALL & E_NOTICE & E_STRICT
Restarted and tried to run update.php - and to my surprise the update.php ran completely without any error. I did not change anything else. To confirm, I reverted the settings in my php.ini and restart the servers, and it didn't work with the original settings.
I'm running Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2 using MAMP 1.9.2...
Comment #29
dgtlmoon commentedsame problem here
Comment #30
dgtlmoon commentedsame problem upgrading a 5.23 site to latest 6
Comment #31
Illusioneer commentedAlso having the same problem going from 5.23 to latest 6. Is four years normal for problems to sit open and unresolved?
Comment #32
rfay@Illusioneer, there are thousands of unresolved issues in any nontrivial software product, and Drupal is no exception, as frustrating as that may be. The great thing about Drupal is that anybody can help fix things. The bad thing is that people only end up fixing the things that are in *their* way, and this issue is mostly about misconfiguration in settings.php, if I'm not mistaken. As a result, the experts who know how to fix things don't have experiences like this.
Note that very, very few changes are being committed to 6.x at this point, so this issue will probably never be fixed unless somebody makes it a holy crusade.
Comment #33
Illusioneer commented@rfay Easy for you to say, a third of my employers clients are still using 4.7. Not so much a burning crusade as an endless torture.
Comment #34
beliy_snow commentedthat helps me:
1. backup your sites/example.com/settings.php
2. remove sites/example.com/settings.php
3. launch your site (you'll see install.php)
4. Drupal will show errors you should fix
5. fix them (usually it's the matter of files and directories permission)
6. (probably) enjoy your working example.com
Comment #35
dee2006 commentedJust my 2cents: I was upgrading from 4.7.x and had the "PHP Fatal error: Call to undefined function _system_theme_data() ..." err message which was solved by disabling quite some non critical modules in system table.