I'm testing 6-7 updates and I've done the following:
- made a simple D6 site and used devel generate to creates nodes, taxos, users.
- disabled non-core modules
- dumped the database
- re-imported it as a new database
- pointed a fresh CVS copy of D7 at it by editing settings.php (basing the database connection settings on a working D7 I already have locally)
I get this:
Fatal error: Class 'MergeQuery_mysql' not found in /Users/joachim/Sites/drupal-7-upgrade/includes/database/database.inc on line 731
Debugging shows that the function was called for table 'cache_bootstrap' with options:
Array ( [target] => default )
Comments
Comment #1
catchDid you visit update.php?
Comment #2
joachim commentedI hadn't.
But now I have, that's a WSOD.
I had a thought: should I have copied over the D6 settings.php rather than put the DB details into the D7 one?
Comment #3
catchPlease follow the same steps again, but visit update.php first without visiting anything else. If it's a wsod, is there an error? If not is there something in error log?
Comment #4
Crell commentedWe need to get this issue resolved, as it will likely help here: #688704: Give DB its own autoload function (At least that's why that issue was created in the first place.)
Comment #5
joachim commentedIt's a WSOD with no message.
Error log says:
[30-Mar-2010 15:09:11] PHP Fatal error: Class 'MergeQuery_mysql' not found in /Users/joachim/Sites/drupal-7-upgrade/includes/database/database.inc on line 731
[30-Mar-2010 15:09:37] PHP Fatal error: Call to undefined function _system_rebuild_theme_data() in /Users/joachim/Sites/drupal-7-upgrade/includes/theme.inc on line 585
Comment #6
Anonymous (not verified) commentedsubscribe.
Comment #7
catchComment #8
Anonymous (not verified) commentedjust confirming, using joachim's step from the initial description, then hitting update.php, i get:
Fatal error: Call to undefined function _system_rebuild_theme_data() in /var/www/drupal/core/7/testupdate/includes/theme.inc on line 585
Comment #9
Anonymous (not verified) commentedi put some debug in before the _system_rebuild_theme_data() call, and it seems this is the original error:
so, we have a schema issue, then we hit #742246: Handle uncaught exceptions when the error handler tries to log the error.
Comment #10
Anonymous (not verified) commentedseems the semaphore table landed in D6, so the fix is to take out the create and do an update on that table instead.
Comment #11
Anonymous (not verified) commentedD6 version of {semaphore} has an index on expire, D7 has an index on value. both cols are used in queries in D6, so index should probably be on both expire and value. leaving that for another issue.
Comment #12
catchAt the moment we support upgrades from all versions of 6.0 onwards - this is a policy I strongly disagree with, but we need a dedicated issue to change that. So this will first need to check if the table exists, then do the update/create as necessary.
Comment #13
Anonymous (not verified) commentedright, good point, i'll reroll shortly.
Comment #14
rfayComment #15
joachim commentedI think the "Fatal error: Call to undefined function _system_rebuild_theme_data()" message itself needs fixing -- I get it if the DB has been wiped, and we should fail more gracefully.
Comment #16
Anonymous (not verified) commentedattached patch checks for the existence of semaphore before creating it as per #12.
@joachim - that error comes from the error handling code, and is being addressed here - #742246: Handle uncaught exceptions
Comment #17
Anonymous (not verified) commentedfix status.
Comment #18
moshe weitzman commentedFWIW, I also disagree with supporting upgrade from any version of d6. We can barely test one upgrade path, lets not add 15 more.
Comment #19
catchOpened #760014: Stop supporting direct updates from Drupal < 6.17.
Comment #20
scor commentedI also agree supporting all the flavors of 6.x is a nightmare for fixing the upgrade path. Let's just assume the semaphore table exists, all we need to do is fix its index according to D7 schema.
Comment #21
andypost@scor this assumption valid only for d5->d6 upgraded installs.
About _system_theme_data #766100-10: Undefined function _system_rebuild_theme_data when trying to run update.php from D6 -> D7
Comment #22
bshort commentedSubscribe
Comment #23
catch@andypost: webchick agreed to #760014: Stop supporting direct updates from Drupal < 6.17, so we should proceed on that basis. Patch looks good.
Comment #24
Anonymous (not verified) commentedyep, patch looks good. probably a separate issue, but i don't see why we don't include 'name' in the index? looking at the queries in includes/lock.inc, we seem to use that column in where conditions a lot.
Comment #25
webchickCommitted to HEAD!
Comment #26
Cheek commentedI'm still getting this error with the latest 7.x-dev.
[Fri Apr 23 09:17:47 2010] [error] [client ::1] PHP Fatal error: Call to undefined function _system_rebuild_theme_data() in C:\\xampp\\htdocs\\includes\\theme.inc on line 585Not sure about the 6.17 talk. I'm trying to update from 6.16. Should I update to the latest 6.x-dev first?
Comment #27
andypost@Cheek please try again because commited #688294: Switch from db_is_active() to proper exception catching
Also this bug was caused #766100: Undefined function _system_rebuild_theme_data when trying to run update.php from D6 -> D7
Comment #28
Cheek commentedSeems like 766100-list-themes-d7.patch is included in the latest 7.x-dev I have.
After applying 688294-die-dba-d7.patch I only get a different line:
[Fri Apr 23 10:44:47 2010] [error] [client ::1] PHP Fatal error: Call to undefined function _system_rebuild_theme_data() in C:\\xampp\\htdocs\\includes\\theme.inc on line 591Comment #29
andypost@Cheek I think you should reopen #766100: Undefined function _system_rebuild_theme_data when trying to run update.php from D6 -> D7 and post more info if possible
Comment #30
andypostI've tested d6-d7, it works fine
Comment #31
Cheek commentedYeah, this is probably not related to the OP's problem. I'll try the other thread..
Comment #33
yoroy commentedTrying to upgrade a simple D6.19 site to D7 beta 1, same scenario as in the original post here. Getting the same error of "Fatal error: Class 'MergeQuery_mysql' not found in /Users/yoroy/Sites/yoroy/includes/database/database.inc on line 718"
This is using MAMP locally, MySQL 5.1.37, PHP 5.2.11. I'll need help/instructions on what to do to debug this because I don't how to do that. Find me on IRC to discuss or point out the user error :)
Comment #34
steinmb commentedHi
Is this a clean install of D6.19 or is this an existing site that have been installed on an older 6.x and upgraded at some point to 6.19?
Comment #35
chx commentedI got the dump from yoroy and I could not reproduce. Ubuntu 10.04.1, PHP 5.3.2-1ubuntu4.2, MySQL 5.1.41-3ubuntu12.6
Comment #36
yoroy commentedExisting site, upgraded to 6.19 just before trying the upgrade to d7. I'll try to reproduce this later today. One more note: the hosting environment is not the same as my local env. I did get the d6 version of the live site running fine locally though.
Comment #37
damien tournoud commentedJust to confirm, are you visiting
update.phpor pointing directly at the front page?Comment #38
yoroy commentedInteresting, visiting both the frontpage and update.php I get different errors now (using the same untouched installation)
http://skitch.com/yoroy/d4apb/access-denied-yoroy
http://skitch.com/yoroy/d4apf/error-drupal
and
http://skitch.com/yoroy/d4ape/error-yoroy for hitting /user
This is getting messy no? I'm offline for the next couple of hours. Will try from scratch again then and report back.
Comment #39
berdirThe notices on update.php are because the locale cache has changed. These only happen once.
I remember trying to handle that automatically once but it is tricker than it looks :)
Anyway, you should be update to run update.php once you set $update_free_access to TRUE.
No idea about the MergeQuery error, you could try to debug http://api.drupal.org/api/function/drupal_autoload_class/7 and figure out who is trying to do that Merge query.
Comment #40
carlos8f commentedDo try $update_free_access to TRUE, that could be all there is to it. The frontpage is totally not meant to be accessed during an upgrade, so if the MergeQuery error happens on the frontpage only (@yoroy, please confirm this), it's more an issue that we don't enforce maintenance mode when the upgrade is started, leading to irrelevant error messages.
Comment #41
yoroy commentedYes, I managed to get further into the upgrade process (but now running into #934246: An AJAX HTTP error occurred during upgrade). Setting $update_free_access to TRUE did the trick. Back to fixed, sorry for your time!