Error after upgrade from 2.2.5-full to 2.3-full-en

len1754

Joined: 2009-05-30
Posts: 13
Posted: Sat, 2009-05-30 11:21

Need some help please:-

I had a completely OK, all the boxes ticked, installation till I went to the gallery.

I have tried clearing the cache via the "~lib/support/index.php" route. I went through the unpack tar.gz again but came back to same error so forced a new installation keeping the old data files. Still same error.

I did use the cleanup.sh script to clean out the reported extra not needed files.

Have been using Gallery from way back and have always encountered problems during upgrades. Does this happen for everyone? Previously I have managed a recovery by re-installing but not this time.

Thanks
Len

Gallery version :was 2.2.5-full, now 2.3-full-en
PHP version : 4.3.10
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33):
Database (e.g. MySql 5.0.32): 3.23.3a
Activated toolkits (e.g. NetPbm, GD):
Operating system (e.g. Linux): win XP
Browser (e.g. Firefox 2.0):Firefox 3
[/size]

Error (ERROR_MISSING_VALUE) : Undefined map: GalleryCacheMap

* in modules/core/classes/GalleryStorage.class at line 1256 (gallerycoreapi::error)
* in modules/core/classes/GalleryStorage.class at line 1248 (mysqlstorage::describemap)
* in modules/core/classes/GalleryStorage.class at line 571 (mysqlstorage::describemap)
* in modules/core/classes/GalleryCoreApi.class at line 2912 (mysqlstorage::getmapentry)
* in modules/core/classes/GalleryDataCache.class at line 623 (gallerycoreapi::getmapentry)
* in main.php at line 369 (gallerydatacache::getpagedata)
* in main.php at line 104
* in main.php at line 88

Debug Output
file_exists(/share/storage/03/ro/royles/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) Unimplemented: GalleryUrlGenerator getParameter language.useBrowserPref for core plugin file_exists(/share/storage/03/ro/royles/g2data/cache/module/core/0/0/0.inc) Warning: Unable to select locale en_GB controller , view Loading plugin core Class not defined, trying to include it. file_exists(/share/storage/03/ro/royles/gallery2/modules/core/module.inc) core plugin successfully instantiated file_exists(/share/storage/03/ro/royles/g2data/versions.dat) file(/share/storage/03/ro/royles/g2data/versions.dat, ) file_exists(/share/storage/03/ro/royles/gallery2/modules/httpauth/classes/HttpAuthPlugin.class) file_exists(/share/storage/03/ro/royles/g2data/cache/module/httpauth/0/0/0.inc) getParameter id.anonymousUser for core plugin [1243682005] can't guarantee 5 -- extending! file_exists(/share/storage/03/ro/royles/g2data/cache/entity/0/0/5.inc) Loading plugin core core plugin successfully instantiated Check the version of the core plugin file_exists(/share/storage/03/ro/royles/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the core plugin is ok file_exists(/share/storage/03/ro/royles/gallery2/modules/core/ShowItem.inc) getParameter acceleration for core plugin getParameter id.anonymousUser for core plugin getParameter acceleration for core plugin getParameter id.anonymousUser for core plugin (mysqlt): SET NAMES "utf8" (mysqlt): SELECT g2_Group.g_id, g2_Group.g_groupName FROM g2_UserGroupMap, g2_Group WHERE g2_Group.g_id = g2_UserGroupMap.g_groupId AND g2_UserGroupMap.g_userId = 5 ORDER BY g2_Group.g_groupName LIMIT 2147483647 (mysqlt): SELECT g2_Schema.g_info FROM g2_PluginMap, g2_Schema WHERE g2_PluginMap.g_pluginId = g2_Schema.g_pluginId AND g2_Schema.g_type = 'map' AND g2_PluginMap.g_active = 1 (mysqlt): SELECT g_module, g_permission, g_description, g_bits, g_flags FROM g2_PermissionSetMap (mysqlt): SELECT DISTINCT g2_AccessMap.g_accessListId FROM g2_AccessMap WHERE g2_AccessMap.g_userOrGroupId IN (5,4) AND g2_AccessMap.g_permission & 1 = 1 (mysqlt): SELECT g2_Schema.g_info FROM g2_Schema WHERE g2_Schema.g_type = 'map' file_exists(/share/storage/03/ro/royles/gallery2/modules/httpauth/module.inc) getParameter default.theme for core plugin Loading plugin matrix Class not defined, trying to include it. file_exists(/share/storage/03/ro/royles/gallery2/themes/matrix/theme.inc) matrix plugin successfully instantiated Check the version of the matrix plugin file_exists(/share/storage/03/ro/royles/g2data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the matrix plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok getParameter smarty.compile_check for core plugin getParameter id.adminGroup for core plugin (mysqlt): SELECT g_userId FROM g2_UserGroupMap WHERE g_userId=5 AND g_groupId=3 LIMIT 1 realpath(/share/storage/03/ro/royles/gallery2/modules/core/classes/../../../) realpath(/share/storage/03/ro/royles/gallery2/) getParameter id.rootAlbum for core plugin file_exists(/share/storage/03/ro/royles/g2data/cache/entity/0/0/7.inc) (mysqlt): SELECT g_itemId FROM g2_AccessSubscriberMap WHERE g_itemId=7 AND g_accessListId IN (2973,3009,3129,2558,3276,2948,3354,3413) LIMIT 1 getParameter default.theme for core plugin Loading plugin matrix matrix plugin successfully instantiated Check the version of the matrix plugin The version of the matrix plugin is ok file_exists(/share/storage/03/ro/royles/g2data/smarty/templates_c/%%1987239419/matrix) is_dir(/share/storage/03/ro/royles/g2data/smarty/templates_c/%%1987239419/matrix) file_exists(/share/storage/03/ro/royles/g2data/smarty/templates_c/%%1987239419/matrix) is_writeable(/share/storage/03/ro/royles/g2data/smarty/templates_c/%%1987239419/matrix) file_exists(/share/storage/03/ro/royles/g2data/smarty/templates_c/%%1987239419/matrix/v_14) file_exists(/share/storage/03/ro/royles/g2data/cache/theme/_all/localUrlMap.txt) file_exists(/share/storage/03/ro/royles/gallery2/lib/javascript/local/BlockToggle.js) file_exists(/share/storage/03/ro/royles/gallery2/modules/core/../../themes/matrix/local/theme.css) file_exists(/share/storage/03/ro/royles/gallery2/themes/matrix/local/theme.css)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2009-05-30 11:47

You need to create the CacheMap table
in phpMyAdmin:

DROP TABLE IF EXISTS `g2_CacheMap`;
CREATE TABLE IF NOT EXISTS `g2_CacheMap` (
  `g_key` varchar(32) NOT NULL,
  `g_value` longtext,
  `g_userId` int(11) NOT NULL,
  `g_itemId` int(11) NOT NULL,
  `g_type` varchar(32) NOT NULL,
  `g_timestamp` int(11) NOT NULL,
  `g_isEmpty` int(1) default NULL,
  PRIMARY KEY  (`g_key`,`g_userId`,`g_itemId`,`g_type`),
  KEY `g2_CacheMap_75985` (`g_itemId`),
  KEY `g2_CacheMap_21979` (`g_userId`,`g_timestamp`,`g_isEmpty`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Sat, 2009-05-30 23:00

OK thanks for the reply, it hasn't been a good day ;-)
I renamed my existing CacheMap table (looked same as yours except for keys) as CacheMap_old and imported your text. Seemed to line up OK. Then delayed by ISP password stuff.

When they got it together, I tried again and database errors (due to password stuff had changed) Reinstalled to set password etc. Same.
Cleared out the complete Gallery2 folder (G2data is elsewhere)and reinstalled.

Still got the same exact error.

Is this likely something to do with the change from full-everything to full-en? I could try that version if it would help?

Regards
Len

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Mon, 2009-06-01 09:08

I have noticed that my original g2_CacheMap (which obviously did exist) was set for latin1-swedish ci collation? Anyhow changed that to utf8-general (as the rest of the tables appear to be) and reinstated this table. It looks like this. Are the keys differences to suprsidr's version significant?

g_key varchar(32) utf8_general_ci No
g_value longtext utf8_general_ci Yes NULL
g_userId int(11) No 0
g_itemId int(11) No 0
g_type varchar(32) utf8_general_ci No
g_timestamp int(11) No 0
g_isEmpty int(1) Yes NULL

PRIMARY PRIMARY 0 g_key, g_userId, g_itemId, g_type
g2_CacheMap_69068 INDEX None g_userId
g2_CacheMap_75985 INDEX None g_itemId
g2_CacheMap_81545 INDEX None g_type
g2_CacheMap_24286 INDEX None g_timestamp

Anyways I have checked the table and emptied it. Still same error message. Swithed on php error logging via main.php mod but zero errors there. Anything else I should do?

I also renamed table so I didn't have one and upgrader duly complained. If I do same and try a fresh install will this rebuild -just- the missing table? Or will it want to start from scratch on the database?

Thanks
Len

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Mon, 2009-06-01 09:38

My site is at http://ccgi.royles.force9.co.uk/gallery2/main.php or http://www.len-royles.co.uk/

I noticed a pile of Smarty Debug Console errors also:-

included templates & config files (load time in seconds)
themes/matrix/templates/error.tpl (0.12559) (total)
modules/core/templates/ErrorPage.tpl (0.00900)
assigned template variables
{$ErrorPage} Array (2)
isAdmin => false
stackTrace => "Error (ERROR_MISSING_VALUE) : Undefi..."
{$SCRIPT_NAME} "/gallery2/main.php"
{$_debug_config_keys} Array (2)
0 => "files"
1 => "vars"
{$_debug_config_vals} Array (2)
0 => Array (0)
1 => Array (0)
{$_debug_keys} Array (5)
0 => "ErrorPage"
1 => "SCRIPT_NAME"
2 => "head"

etc.

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Mon, 2009-06-01 23:00

Checking the upgrade log from the initial upgrade time I find an entry as:-

2009-05-30 10:28:11 [TMP_SESSION_ID_DI_NOISSES_PMT] Table GalleryCacheMap: missing entry in Schema table
2009-05-30 10:28:11 [TMP_SESSION_ID_DI_NOISSES_PMT] Table GalleryPluginPackageMap: missing entry in Schema table
2009-05-30 10:28:11 [TMP_SESSION_ID_DI_NOISSES_PMT] Table GallerySessionMap: missing entry in Schema table

and later:-

2009-05-30 10:28:11 [TMP_SESSION_ID_DI_NOISSES_PMT] file_exists(/share/storage/03/ro/royles/gallery2/modules/core/classes/Maps.inc)
2009-05-30 10:28:11 [TMP_SESSION_ID_DI_NOISSES_PMT] file_exists(/share/storage/03/ro/royles/gallery2/modules/core/classes/Entities.inc)
2009-05-30 10:28:11 [TMP_SESSION_ID_DI_NOISSES_PMT] Table GalleryCacheMap: missing entry in Schema table

I didn't see any errors during the upgrade process? Is it possible that these other two tables are broken too?

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Tue, 2009-06-02 11:04

So I am getting nowhere.

I am currently trying to reinstall the previously working version 2.2.5.
How many times do I have to go around the authenticate login.txt loop before I realise I should really be looking for a user friendly Gallery2 type application.
Anybody know of one?

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Thu, 2009-06-04 09:28
len1754 wrote:
Anybody know of one?

Coppermine?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-06-04 11:06

might these help?

INSERT INTO `g2_Schema` VALUES ('CacheMap', 1, 1, 'CREATE TABLE DB_TABLE_PREFIXCacheMap(\n DB_COLUMN_PREFIXkey varchar(32) NOT NULL,\n DB_COLUMN_PREFIXvalue longtext,\n DB_COLUMN_PREFIXuserId int(11) NOT NULL,\n DB_COLUMN_PREFIXitemId int(11) NOT NULL,\n DB_COLUMN_PREFIXtype varchar(32) NOT NULL,\n DB_COLUMN_PREFIXtimestamp int(11) NOT NULL,\n DB_COLUMN_PREFIXisEmpty int(1),\n PRIMARY KEY(DB_COLUMN_PREFIXkey, DB_COLUMN_PREFIXuserId, DB_COLUMN_PREFIXitemId, DB_COLUMN_PREFIXtype),\n INDEX DB_TABLE_PREFIXCacheMap_75985(DB_COLUMN_PREFIXitemId),\n INDEX DB_TABLE_PREFIXCacheMap_21979(DB_COLUMN_PREFIXuserId, DB_COLUMN_PREFIXtimestamp, DB_COLUMN_PREFIXisEmpty)\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(''CacheMap'', 1, 1);\n\n', 'core', 'map', 'a:1:{s:15:"GalleryCacheMap";a:7:{s:3:"key";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:5:"value";a:2:{s:4:"type";i:4;s:4:"size";i: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:4:"type";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:9:"timestamp";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:7:"isEmpty";a:2:{s:4:"type";i:8;s:4:"size";i:2;}}}');
INSERT INTO `g2_Schema` VALUES ('PluginPackageMap', 1, 1, 'CREATE TABLE DB_TABLE_PREFIXPluginPackageMap(\n DB_COLUMN_PREFIXpluginType varchar(32) NOT NULL,\n DB_COLUMN_PREFIXpluginId varchar(32) NOT NULL,\n DB_COLUMN_PREFIXpackageName varchar(32) NOT NULL,\n DB_COLUMN_PREFIXpackageVersion varchar(32) NOT NULL,\n DB_COLUMN_PREFIXpackageBuild varchar(32) NOT NULL,\n DB_COLUMN_PREFIXlocked int(1) NOT NULL,\n INDEX DB_TABLE_PREFIXPluginPackageMap_80596(DB_COLUMN_PREFIXpluginType)\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(''PluginPackageMap'', 1, 1);\n\n', 'core', 'map', 'a:1:{s:23:"GalleryPluginPackageMap";a:6:{s:10:"pluginType";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:8:"pluginId";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:11:"packageName";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:14:"packageVersion";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:12:"packageBuild";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:6:"locked";a:3:{s:4:"type";i:8;s:4:"size";i:2;s:7:"notNull";b:1;}}}');
INSERT INTO `g2_Schema` VALUES ('SessionMap', 1, 1, 'CREATE TABLE DB_TABLE_PREFIXSessionMap(\n DB_COLUMN_PREFIXid varchar(32) NOT NULL,\n DB_COLUMN_PREFIXuserId int(11) NOT NULL,\n DB_COLUMN_PREFIXremoteIdentifier varchar(128) NOT NULL,\n DB_COLUMN_PREFIXcreationTimestamp int(11) NOT NULL,\n DB_COLUMN_PREFIXmodificationTimestamp int(11) NOT NULL,\n DB_COLUMN_PREFIXdata longtext,\n PRIMARY KEY(DB_COLUMN_PREFIXid),\n INDEX DB_TABLE_PREFIXSessionMap_53500(DB_COLUMN_PREFIXuserId, DB_COLUMN_PREFIXcreationTimestamp, DB_COLUMN_PREFIXmodificationTimestamp)\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(''SessionMap'', 1, 1);\n\n', 'core', 'map', 'a:1:{s:17:"GallerySessionMap";a:6:{s:2:"id";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:6:"userId";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:16:"remoteIdentifier";a:3:{s:4:"type";i:2;s:4:"size";i:2;s:7:"notNull";b:1;}s:17:"creationTimestamp";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:21:"modificationTimestamp";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:4:"data";a:2:{s:4:"type";i:4;s:4:"size";i:4;}}}');

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

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Thu, 2009-06-04 18:15

They might help if I knew how to use them :-)

I can see the similarity in phpMyAdmin but am afraid I lack the skill to manually edit the table entries.
Can you break the lines down into the table column sections?

Or is there an easier way to 'insert' this?

I do have an xml dump from the upgrade installation. Again this form of presentation doesn't match the xml format.

I suspect I just need a nudge in the right direction.

Thanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-06-04 22:37

In phpMyAdmin click the sql tab, copy those lines into the field and execute the query.

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

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Thu, 2009-06-04 23:01

Thanks, that has done the trick.

I guess it's just one of those things that the upgrade failed?

Anyway again, many thanks for your input.

Regards

Len

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2009-06-05 00:22

Great :)
Glad we got it figured out. Maybe your DB server was spotty that day?

Also glad you didn't find it necessary to jump ship.

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

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Fri, 2009-06-05 09:19

Unfortunately I still have problems........

The new slideshow just gives me a blank image. Uninstalled it.
The default slideshow gave me a crippled screen. Uninstalled it. Gave database errors.
Trying to sort things out. Will start new thread if that's best.

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Fri, 2009-06-05 09:29

Looks like something isn't right in PluginPackageMap. Get this error trying to use the plugins manager:-

(mysqlt): SELECT g_locked, g_packageVersion, g_packageBuild, g_packageName FROM g2_PluginPackageMap WHERE g_pluginType='module' AND g_pluginId='albumselect'

1054: Unknown column 'g_locked' in 'field list'

adodb_mysqlt._execute(SELECT g_locked, g_packageVersion,
g_packageBuild, g_packageName FROM g2_PluginPackageMap WHERE
g_pluginType='module' AND g_plug...) %
line 872, file: adodb.inc.php

adodb_mysqlt.execute(SELECT g_locked,
g_packageVersion, g_packageBuild, g_packageName FROM g2_PluginPackageMap
WHERE g_pluginType=? AND g_pluginId=?, Array[2]) % line 634, file: GalleryStorage.class
mysqlstorage.getmapentry(GalleryPluginPackageMap, Array[4],
Array[2], Array[0]) % line 2912, file:
GalleryCoreApi.class
gallerycoreapi.getmapentry(GalleryPluginPackageMap, Array[4],
Array[2]) % line 310, file: GalleryRepositoryUtilities.class
galleryrepositoryutilities.getpluginpackages(module,
albumselect) % line 200, file: GalleryRepository.class

I don't have a field 'g_locked' in my g2_PluginPackageMap?

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Fri, 2009-06-05 10:57

OK fixed that. 'g_locked' was missing. Rebuilt OK. Seems that that is now OK.
Uninstalled piclens slideshow and reinstalled.
Slideshow just gives me dark window with controls etc but no image.
Uninstalled that.
Default slideshow module is installed. Just gives black screen with horizontal seperator lines, so that's broken too.
I will explore these issues seperately.

Thanks
Len

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2009-06-05 11:32

I have an update to the slideshow module on mysite.

It seems your environment has some issues.

Using my pluginPackageMap would lead to having extra/missing entries depending on the plugins I have installed.
You may have to uninstall/re-install whichever plugins give you trouble.

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

 
len1754

Joined: 2009-05-30
Posts: 13
Posted: Fri, 2009-06-05 14:32

Yes uninstall/re-install fixed problem.
Copied your latest version over and that runs fine too.

I did venture to the dark side. I do prefer the lightbox type of slideshow here:-
http://ccgi.royles.force9.co.uk/cpg14x/displayimage.php?album=93&pos=0
-click on image for lightbox type of slideshow.

At the moment I have all my images etc in both G2 and CPG. CPG appears faster, less featured, category/album structure restrictive etc.
Still prefer the features of G2. But must have a lightbox slideshow ;-)

Anyway thanks again for all your help.

Regards
Len

 
brossow
brossow's picture

Joined: 2004-02-12
Posts: 8
Posted: Thu, 2009-09-17 14:08

For the record, I had this exact same problem after upgrading this morning. The post from suprsidr (Posted: Thu, 2009-06-04 05:06) did the trick ... after I renamed the existing entries in the table via phpMyAdmin, since it complained about existing entries if I just ran the query. (After confirming it worked, I then dropped the renamed entries.) Dunno why it went bad, but thanks for the fix.

Brent