"An error occurred while upgrading Gallery Core Module"
KnightWolfJK
Joined: 2003-07-31
Posts: 31 |
Posted: Sun, 2007-05-06 15:09 |
I'm moving data from Gallery 2.1.1 to a server with Gallery 2.2.1. I am using the Codex section on moving servers as a guide. I can't upgrade the old Gallery to 2.2.1 (which is part of the reason I'm switching hosts). I chose to "Reuse Existing Tables" and added the old versions.dat to the new g2data folder. The install routine picked up on the version mismatch and tried to run the upgrader. Here's what I got... Stack Trace: Error (ERROR_STORAGE_FAILURE) * in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 961 (GalleryCoreApi::error) * in modules/core/classes/GalleryStorage.class at line 493 (GalleryStorageExtras::execute) * in modules/core/CoreModuleExtras.inc at line 3036 (GalleryStorage::execute) * in modules/core/CoreModuleExtras.inc at line 80 (CoreModuleExtras::convertCharacterSetToUtf8) * in modules/core/module.inc at line 433 (CoreModuleExtras::upgrade) * in modules/core/classes/GalleryModule.class at line 159 (CoreModule::upgrade) * in upgrade/steps/UpgradeCoreModuleStep.class at line 85 (GalleryModule::installOrUpgrade) * in upgrade/index.php at line 185 (UpgradeCoreModuleStep::processRequest) Debug Output: (this was many many many lines, I only included the sections with bold red highlighting) Query: SELECT g2_User.g_userName, g2_User.g_fullName, g2_User.g_hashedPassword, g2_User.g_email, g2_User.g_language, g2_User.g_locked, g2_Entity.g_id, g2_Entity.g_creationTimestamp, g2_Entity.g_isLinkable, g2_Entity.g_linkId, g2_Entity.g_modificationTimestamp, g2_Entity.g_serialNumber, g2_Entity.g_entityType, g2_Entity.g_onLoadHandlers FROM g2_User, g2_Entity WHERE g2_User.g_id IN (25) AND g2_Entity.g_id=g2_User.g_id failed. Unknown column 'g2_User.g_locked' in 'field list' 1054: Unknown column 'g2_User.g_locked' in 'field list' ADOConnection._Execute(SELECT g2_User.g_userName, g2_User.g_fullName, g2_User.g_hashedPassword, g2_User.g_email, g2_User.g_language, g2_User.g_locked, ...) % line 870, file: adodb.inc.php ADOConnection.Execute(SELECT g2_User.g_userName, g2_User.g_fullName, g2_User.g_hashedPassword, g2_User.g_email, g2_User.g_language, g2_User.g_locked, ..., Array[1]) % line 165, file: GalleryStorageExtras.class GalleryStorageExtras.loadEntities(Array[1]) % line 298, file: GalleryStorage.class GalleryStorage.loadEntities(Array[1]) % line 71, file: GalleryEntityHelper_simple.class GalleryEntityHelper_simple.loadEntitiesById(25) % line 2251, file: GalleryCoreApi.class Unable to load admin user. Using in-memory user object as fallback GalleryModule::installOrUpgrade core module In bootstrap mode (core module) Configure store for core module # # # # # # Query: ALTER TABLE `g2_Derivative` CHANGE `g_derivativeOperations` `g_derivativeOperations` varbinary(255) NULL, CHANGE `g_mimeType` `g_mimeType` varbinary(128) NOT NULL, CHANGE `g_postFilterOperations` `g_postFilterOperations` varbinary(255) NULL failed. Column 'g_mimeType' cannot be part of FULLTEXT index 1283: Column 'g_mimeType' cannot be part of FULLTEXT index ADOConnection._Execute(ALTER TABLE `g2_Derivative` CHANGE `g_derivativeOperations` `g_derivativeOperations` varbinary(255) NULL, CHANGE `g_mimeType` `g..., false) % line 889, file: adodb.inc.php ADOConnection.Execute(ALTER TABLE `g2_Derivative` CHANGE `g_derivativeOperations` `g_derivativeOperations` varbinary(255) NULL, CHANGE `g_mimeType` `g..., Array[0]) % line 954, file: GalleryStorageExtras.class GalleryStorageExtras.execute(ALTER TABLE `g2_Derivative` CHANGE `g_derivativeOperations` `g_derivativeOperations` varbinary(255) NULL, CHANGE `g_mimeType` `g..., Array[0]) % line 493, file: GalleryStorage.class GalleryStorage.execute(ALTER TABLE `g2_Derivative` CHANGE `g_derivativeOperations` `g_derivativeOperations` varbinary(255) NULL, CHANGE `g_mimeType` `g...) % line 3036, file: CoreModuleExtras.inc CoreModuleExtras.convertCharacterSetToUtf8(Object:CoreModule, Object:StatusTemplate) % line 80, file: CoreModuleExtras.inc realpath(/home/intentionally/obfuscated/path/to/gallery2/modules/core/classes/../../../) realpath(/home/intentionally/obfuscated/path/to/gallery2/) Error: Failed to upgrade the core module, this is the error stack trace: Error (ERROR_STORAGE_FAILURE)in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 961 (GalleryCoreApi::error) in modules/core/classes/GalleryStorage.class at line 493 (GalleryStorageExtras::execute) in modules/core/CoreModuleExtras.inc at line 3036 (GalleryStorage::execute) in modules/core/CoreModuleExtras.inc at line 80 (CoreModuleExtras::convertCharacterSetToUtf8) in modules/core/module.inc at line 433 (CoreModuleExtras::upgrade) in modules/core/classes/GalleryModule.class at line 159 (CoreModule::upgrade) in upgrade/steps/UpgradeCoreModuleStep.class at line 85 (GalleryModule::installOrUpgrade) in upgrade/index.php at line 185 (UpgradeCoreModuleStep::processRequest) realpath(/home/intentionally/obfuscated/path/to/gallery2/modules/core/classes/../../../) realpath(/home/intentionally/obfuscated/path/to/gallery2/) Any suggestions? Thanks.
|
|
Posts: 32509
> 1283: Column 'g_mimeType' cannot be part of FULLTEXT index
g2 doesn't have any fulltext index.
did you change your database / indices at some point?
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 31
I guess it depends on what you mean by changing my database. I exported from the old host (MySql 4.0.15, Gallery 2.1.1) and imported to the new host (MySql 5.0.16, Gallery 2.2.1).
Posts: 32509
i guess it's about changing a column that is part of an index from varchar to varbinary.
i wonder why you got that error and thousands of other g2/mysql users didn't have any problem with this before.
Posts: 31
Hrm. Not sure- When it comes to MySql I don't know enough to do more than import/export databases via phpMyAdmin. The exported .sql file was about 980kb, could the down- or up-load have hiccuped? Seems like that would have generated serious errors though.
Apologies, but should I be inferring steps to take from this: "it's about changing a column that is part of an index from varchar to varbinary" ??
Thanks
Posts: 32509
the good new is that you've got a database backup, since you're moving hosts.
so you can try this upgrade again and again.
i don't know why you get this error, but here's what i'd do:
1. restore your database to your backup again.
2. manually convert the tables / columns to unicode / utf8. (change the collation to utf8_general_ci)
3. start the upgrade wizard again
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 31
Cool, thanks, I'll try it later this afternoon. Thanks again
Posts: 31
Well... Progress, but only to a point. The core upgrade went fine after altering all db tables and columns. The plugin upgrade snagged on a bunch of netpbm errors but I pushed through. Post-installation, all images were broken but captions and everything else were in place.
I was still getting errors when trying to activate netpbm, so GD is now activated (with no errors). Images still broken. I've run every maintenance task successfully except one: rebuild thumbs & resizes. Here's what I get:
Any ideas?
@Valiant- Thanks for the help with the database; I have just over a thousand photos, your tips helped immensely.
Posts: 32509
looks like you have some database inconsistencies. here's the canned response for missing object errors:
DATA INTEGRITY:
Error (ERROR_MISSING_OBJECT) : Missing object for ...
some part of your g2 database isn't 100% ok, the data integrity is a little corrupted.
reason: unknown. fix: it's not easy, but you can fix the database manually, someone else had the same problem and i gave a few instructions:
http://gallery.menalto.com/node/57319#comment-209935
http://gallery.menalto.com/node/32741
http://gallery.menalto.com/node/38916
Posts: 32509
@images not shown:
did you uninstall the url rewrite module before moving servers?
it's explained in the move instructions.
@gd / ...:
did you uninstall all graphics toolkit modules before moving servers?
it's explained in the move instructions.
Posts: 31
Well [insert expletive here]. Nope. I remember reading that but thinking, "Gee, I don't use the rewrite module, so..."
I didn't see this in the instructions; just double-checked, still don't see it. Not that it would have made a difference, I probably would have missed it just like the part about url_rewrite.
So, with me neglecting these two steps, are things still possibly salvageable (RE: the post with three links to DB instructions) or is it a lost cause? Comments and images are truly the only two things I need.
Thanks for all your help.
Posts: 32509
> I didn't see this in the instructions; just double-checked, still don't see it.
see:
FAQ: How can I move my gallery installation from one server to another?
step 10. you can either uninstall the graphics toolkits before moving or after moving. but you need to uninstall those modules and install them again.
you can sure still fix things now.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 31
Okay. I deactivated/ uninstalled/ reinstalled netpbm, GD, ImageMagick, ffmmpeg, and url_rewrite. Ran through all the maintenance tasks- same results.
So i ran
and got:
MySQL returned an empty result set (i.e. zero rows)
I noticed in one of the other posts, you said one might have to look in other tables. So I hacked a script I found on the web used to provide SQL syntax for dropping tables (to save me the heartache of handpoking each table name), and tried using
but of course, the first table didn't have a g_id column. So I'm stuck again. I didn't even look first to see if each table had a g_id column; do I just want to run these two queries on any tables that have the g_id column in them?
Posts: 32509
why are you looking for the id 1911? did you see that number in your debug output? it could be another id as well...
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 31
Yes, my first line is "Error (ERROR_MISSING_OBJECT) : Missing object for 1991"
I'm sorry, but I don't understand the overall concept of what those SQL commands are determining, or what to do from here.
Posts: 32509
1991 or 1911 ?
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 31
I'm a dolt... Reran all commands using 1991 instead of 1911. Still zero results.
Posts: 32509
according to the error (BuildDerivativesTask.class line 119 Gallery 2.2), there is a row in the g2_DataItem table with id = 1991.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 31
It's been 2.5 months since I've posted, and I haven't been able to even look at this issue again. I never would have thought I'd abandon my photo album for 3 months, but I guess that's how it goes sometimes.
Now that I'm able to tackle this again, I wonder: Can the captions (and their corresponding filenames) be extracted from MySQL somehow? If so would it just be better to start with a fresh install of 2.2.2, and create the albums and captions again?
Posts: 2
ok. thanks.
-----------------------
http://www.idezmax.com/
Posts: 32509
There are links in this discussion thread to other discussions that have instructions on how to fix database inconsistencies.
If they don't help, you can start from scratch of course.
As for captions, they're stored in the g2_Item table. You can use any mysql / SQL tool to export the information, but you'll have to write your own custom scripts if you want to use the exported data in a fresh gallery installation.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage