2.2.6 -> 2.3.1 upgrade error: (ERROR_MISSING_VALUE) : Undefined map: GalleryToolkitOperationMimeTypeMap

xPatryk

Joined: 2005-10-29
Posts: 19
Posted: Mon, 2011-01-10 10:47

Hello:)

I tried to upgrade my Gallery 2.2.1 to 2.3.1 for migrating to version 3.0, but I get a lot of errors, so first I've upgraded it to version 2.2.6 (no problems) and next I tried to update it to ver. 2.3.0 or 2.3.1, but always I get an error:

Quote:
Stack Trace:

Error (ERROR_MISSING_VALUE) : Undefined map: GalleryToolkitOperationMimeTypeMap
in modules/core/classes/GalleryStorage.class at line 1256 (GalleryCoreApi::error)
in modules/core/classes/GalleryStorage.class at line 1248 (GalleryStorage::describeMap)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 1067 (GalleryStorage::describeMap)
in modules/core/classes/GalleryStorage.class at line 533 (GalleryStorageExtras::removeMapEntry)
in modules/core/classes/GalleryCoreApi.class at line 2935 (GalleryStorage::removeMapEntry)
in modules/core/classes/helpers/GalleryToolkitHelper_medium.class at line 211 (GalleryCoreApi::removeMapEntry)
in modules/core/classes/helpers/GalleryToolkitHelper_medium.class at line 308 (GalleryToolkitHelper_medium::unregisterToolkit)
in modules/core/classes/GalleryCoreApi.class at line 2005 (GalleryToolkitHelper_medium::unregisterToolkitsByModuleId)
in modules/core/classes/GalleryModule.class at line 358 (GalleryCoreApi::unregisterToolkitsByModuleId)
in modules/core/classes/GalleryPlugin.class at line 285 (GalleryModule::deactivate)
in modules/core/classes/GalleryModule.class at line 234 (GalleryPlugin::reactivate)
in upgrade/steps/UpgradeCoreModuleStep.class at line 85 (GalleryModule::installOrUpgrade)
in upgrade/index.php at line 186 (UpgradeCoreModuleStep::processRequest)

Debug Output:

file_exists(/var/www/virtual/paymaster.pl/files/dane_galerii/versions.dat)
file(/var/www/virtual/paymaster.pl/files/dane_galerii/versions.dat, )
is_writeable(/var/www/virtual/paymaster.pl/htdocs/galeria2/v23/config.php)

--------------------------------------------------------
Upgrade Core Module
--------------------------------------------------------

--------------------------------------------------------
System and Gallery information:
--------------------------------------------------------
Gallery version: 2.2.6
File integrity: There are missing/modified files!
SVN install: No
PHP version: 5.3.3-0.dotdeb.1 cgi-fcgi
PHP memory limit: 256M
PHP disable_functions: show_source, passthru, shell, symlink, popen,
proc_open
PHP zend.ze1_compatibility_mode:
Webserver: Apache/2.2.9 (Debian) PHP/4.4.4-8+etch6 mod_ssl/2.2.9
OpenSSL/0.9.8g
Database: mysql 5.0.51a-24+lenny4
Operating system: Linux qnmedia.pl 2.6.26-2-amd64 #1 SMP Thu Sep 16
15:56:38 UTC 2010 x86_64
Browser: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
--------------------------------------------------------

What is going bad?

xPatryk

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-01-10 12:57

Your g2_Schema table is missing an entry for TkOperatnMimeTypeMap
Using phpMyAdmin or similar execute this query(make sure you get the whole thing):
INSERT INTO `g2_Schema` VALUES ('TkOperatnMimeTypeMap', 1, 0, 'CREATE TABLE DB_TABLE_PREFIXTkOperatnMimeTypeMap(\n DB_COLUMN_PREFIXoperationName varchar(128) NOT NULL,\n DB_COLUMN_PREFIXtoolkitId varchar(128) NOT NULL,\n DB_COLUMN_PREFIXmimeType varchar(128) NOT NULL,\n DB_COLUMN_PREFIXpriority int(11) NOT NULL,\n INDEX DB_TABLE_PREFIXTkOperatnMimeTypeMap_2014(DB_COLUMN_PREFIXoperationName),\n INDEX DB_TABLE_PREFIXTkOperatnMimeTypeMap_79463(DB_COLUMN_PREFIXmimeType)\n) DB_TABLE_TYPE\n/*!40100 DEFAULT CHARACTER SET utf8 */;\n\nINSERT INTO DB_TABLE_PREFIXSchema (\n DB_COLUMN_PREFIXname,\n DB_COLUMN_PREFIXmajor,\n DB_COLUMN_PREFIXminor\n) VALUES(''TkOperatnMimeTypeMap'', 1, 0);\n\n', 'core', 'map', 'a:1:{s:34:"GalleryToolkitOperationMimeTypeMap";a:4:{s:13:"operationName";a:3:{s:4:"type";i:2;s:4:"size";i:2;s:7:"notNull";b:1;}s:9:"toolkitId";a:3:{s:4:"type";i:2;s:4:"size";i:2;s:7:"notNull";b:1;}s:8:"mimeType";a:3:{s:4:"type";i:2;s:4:"size";i:2;s:7:"notNull";b:1;}s:8:"priority";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}}}');

If any other similar errors occur, I have the whole schema here.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
xPatryk

Joined: 2005-10-29
Posts: 19
Posted: Mon, 2011-01-10 14:44

Thank you :)

Restoring g2_Schema table from your sql file fixed that problem :))

 
redrider

Joined: 2008-06-08
Posts: 36
Posted: Thu, 2011-01-13 03:30

I get an error

MySQL said: Documentation
#1062 - Duplicate entry 'TkOperatnMimeTypeMap' for key 1

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-01-13 03:41

Your error was for SubscriptionMap not ToolkitOperationMimeMap

Yours would be:
INSERT INTO `g2_Schema` VALUES ('SubscriptionMap', 1, 0, 'CREATE TABLE DB_TABLE_PREFIXSubscriptionMap(\n DB_COLUMN_PREFIXuserId int(11) NOT NULL,\n DB_COLUMN_PREFIXitemId int(11) NOT NULL,\n DB_COLUMN_PREFIXnotificationName varchar(128) NOT NULL,\n DB_COLUMN_PREFIXhandlerName varchar(128) NOT NULL,\n INDEX DB_TABLE_PREFIXSubscriptionMap_25141(DB_COLUMN_PREFIXnotificationName),\n INDEX DB_TABLE_PREFIXSubscriptionMap_76924(DB_COLUMN_PREFIXuserId, DB_COLUMN_PREFIXitemId)\n) DB_TABLE_TYPE\n/*!40100 DEFAULT CHARACTER SET utf8 */;\n\nINSERT INTO DB_TABLE_PREFIXSchema (\n DB_COLUMN_PREFIXname,\n DB_COLUMN_PREFIXmajor,\n DB_COLUMN_PREFIXminor\n) VALUES(''SubscriptionMap'', 1, 0);\n\n', 'notification', 'map', 'a:1:{s:15:"SubscriptionMap";a:4:{s:6:"userId";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:6:"itemId";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:16:"notificationName";a:3:{s:4:"type";i:2;s:4:"size";i:2;s:7:"notNull";b:1;}s:11:"handlerName";a:3:{s:4:"type";i:2;s:4:"size";i:2;s:7:"notNull";b:1;}}}');
Sorry, that one was not in my complete schema linked above.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
redrider

Joined: 2008-06-08
Posts: 36
Posted: Thu, 2011-01-13 11:32

Should I drop the entire schema and load yours or just keep trying one at a time until I find one that works?

MySQL said: Documentation
#1062 - Duplicate entry 'SubscriptionMap' for key 1

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-01-13 11:49
Quote:
Should I drop the entire schema and load yours or just keep trying one at a time until I find one that works?

NO!

You don't want entries for things you have not yet installed, or you'll get an error when you do try to install those plugins.

but make sure the table exists as well not just the entry in g2_Schema
if the table exists it will have data in it which you may want to export to SQL
if the table does not yet exist, create it:

CREATE TABLE IF NOT EXISTS `g2_SubscriptionMap` (
  `g_userId` int(11) NOT NULL,
  `g_itemId` int(11) NOT NULL,
  `g_notificationName` varchar(128) NOT NULL,
  `g_handlerName` varchar(128) NOT NULL,
  KEY `g2_SubscriptionMap_25141` (`g_notificationName`),
  KEY `g2_SubscriptionMap_76924` (`g_userId`,`g_itemId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Assuming you use InnoDB.

Also if you do not use the notification module you could uninstall it, or uninstall/re-install.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2