Unable to upgrade the Quotes module

galerea
galerea's picture

Joined: 2005-10-16
Posts: 14
Posted: Sat, 2005-11-26 02:12


Gallery version = 2.0.2+ core 1.0.10
PHP version = 4.3.10 apache
Webserver = Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.10 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a
Database = mysql 4.0.25-standard
Toolkits = ArchiveUpload, Thumbnail, Gd
Operating system = Linux montreal.sibername.com 2.6.6-1.435smp #1 SMP Mon Jun 14 09:31:56 EDT 2004 i686
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; eBook; IBP)

Hello, friends.

I have run a CVS upgrade. It went well, everything upgraded smoothly except the Quotes module. Here are the message I have got:

QUOTES MODULE

Stack Trace: 
Error (ERROR_STORAGE_FAILURE) : Error trying to run query: ALTER TABLE g2_QuotasMap DROP INDEX g2_QuotasMap_48775, MODIFY COLUMN g_userOrGroupId int(11) NOT NULL, ADD PRIMARY KEY(g_userOrGroupId)
in modules/core/classes/GalleryStorage/DatabaseStorageExtras.class at line 1508 (gallerystatus::error) 
in modules/core/classes/GalleryStorage/DatabaseStorageExtras.class at line 1268 (databasestorageextras::_executesql) 
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 541 (databasestorageextras::configurestore) 
in modules/core/classes/GalleryStorage.class at line 391 (mysqldatabasestorage::configurestore) 
in modules/core/classes/GalleryModule.class at line 182 (gallerystorage::configurestore) 
in upgrade/steps/UpgradeOtherModulesStep.class at line 71 (quotasmodule::installorupgrade) 
in upgrade/index.php at line 183 (upgradeothermodulesstep::processrequest) 


Debug Output: 
      getParameter permissions.file for core plugin
file_exists(/home/galerea/g2data/cache/module/core/0/0/0.inc)
[1132970703] can't guarantee 300 -- extending!
--------------------------------------------------------------------------------
(mysql): SHOW TABLES   
--------------------------------------------------------------------------------

getParameter id.adminGroup for core plugin
--------------------------------------------------------------------------------
(mysql): 
		  SELECT
		    g2_PluginParameterMap.g_parameterName,
		    g2_PluginParameterMap.g_parameterValue
		  FROM
		    g2_PluginParameterMap
		  WHERE
		    g2_PluginParameterMap.g_pluginType = 'module'
		    AND
		    g2_PluginParameterMap.g_pluginId = 'core'
		    AND
		    g2_PluginParameterMap.g_itemId = 0
		     
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql): 
        SELECT
          g2_UserGroupMap.g_userId,
          g2_User.g_userName
        FROM
          g2_UserGroupMap, g2_User
        WHERE
          g2_UserGroupMap.g_groupId = '3'
          AND
          g2_UserGroupMap.g_userId = g2_User.g_id
	
        ORDER BY
          g2_User.g_userName
         LIMIT 1   
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql): SELECT g_id, g_entityType FROM g2_Entity WHERE g_id IN (6)  

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql): 
                SELECT
                  g2_FactoryMap.g_classType,
                  g2_FactoryMap.g_className,
                  g2_FactoryMap.g_implId,
                  g2_FactoryMap.g_implPath,
                  g2_FactoryMap.g_hints,
                  g2_FactoryMap.g_implModuleId
                FROM
                  g2_FactoryMap
                ORDER BY
                  g2_FactoryMap.g_orderWeight ASC
                   
--------------------------------------------------------------------------------

file_exists(/home/galerea/public_html/modules/core/classes/helpers/../../../../modules/core/classes/GalleryUser.class)
--------------------------------------------------------------------------------
(mysql): SELECT 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, g2_User.g_userName,
g2_User.g_fullName, g2_User.g_hashedPassword, g2_User.g_email,
g2_User.g_language FROM g2_Entity, g2_User WHERE g2_Entity.g_id IN (6) AND
g2_User.g_id=g2_Entity.g_id   
--------------------------------------------------------------------------------

Loading plugin quotas
Class not defined, trying to include it.
file_exists(/home/galerea/public_html/modules/core/classes/helpers/../../../../modules/quotas/module.inc)
quotas plugin successfully instantiated
realpath(/home/galerea/public_html/modules/core/classes/../../..)
Binding text domain: modules_quotas ->
/home/galerea/public_html/modules/quotas/locale
GalleryModule::installOrUpgrade quotas module
getParameter _version for quotas plugin
--------------------------------------------------------------------------------
(mysql): 
		  SELECT
		    g2_PluginParameterMap.g_parameterName,
		    g2_PluginParameterMap.g_parameterValue
		  FROM
		    g2_PluginParameterMap
		  WHERE
		    g2_PluginParameterMap.g_pluginType = 'module'
		    AND
		    g2_PluginParameterMap.g_pluginId = 'quotas'
		    AND
		    g2_PluginParameterMap.g_itemId = 0
		     
--------------------------------------------------------------------------------

Configure store for quotas module
file_exists(/home/galerea/public_html/modules/core/classes/helpers/../../../../modules/quotas/classes/GalleryStorage/DatabaseStorage/schema/schema.tpl)
--------------------------------------------------------------------------------
(mysql): SHOW TABLES   
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql): SELECT g_name, g_major, g_minor FROM g2_Schema  

--------------------------------------------------------------------------------

mysql error: [1062: Duplicate entry '25' for key 1] in EXECUTE("ALTER TABLE
g2_QuotasMap
  DROP INDEX g2_QuotasMap_48775,
  MODIFY COLUMN g_userOrGroupId int(11) NOT NULL,
  ADD PRIMARY KEY(g_userOrGroupId)")

--------------------------------------------------------------------------------
(mysql): ALTER TABLE g2_QuotasMap
  DROP INDEX g2_QuotasMap_48775,
  MODIFY COLUMN g_userOrGroupId int(11) NOT NULL,
  ADD PRIMARY KEY(g_userOrGroupId)   
--------------------------------------------------------------------------------
1062: Duplicate entry '25' for key 1
                  adodb_mysql._execute(ALTER TABLE g2_QuotasMap
  DROP INDEX g2_QuotasMap_48775,
  MODIFY COLUMN g_userOrGroupId int(11) NOT NULL,
  ADD PRIMARY KEY(g_..., false) % line 
855, file: adodb.inc.php
               adodb_mysql.execute(ALTER TABLE g2_QuotasMap
  DROP INDEX g2_QuotasMap_48775,
  MODIFY COLUMN g_userOrGroupId int(11) NOT NULL,
  ADD PRIMARY KEY(g_...) % line 1504,
file: DatabaseStorageExtras.class
            databasestorageextras._executesql(ALTER TABLE
DB_TABLE_PREFIXQuotasMap
  DROP INDEX DB_TABLE_PREFIXQuotasMap_48775,
  MODIFY COLUMN DB_COLUMN_PREFIXuserOrGroupId ...) % line 1268, file: DatabaseStorageExtras.class
         databasestorageextras.configurestore(quotas) % line  541, file: DatabaseStorage.class
      mysqldatabasestorage.configurestore(quotas) % line  391, file: GalleryStorage.class

realpath(/home/galerea/public_html/modules/core/classes/../../../)
Error: Failed to configure the persistent store, this is the error stack
trace: Error (ERROR_STORAGE_FAILURE) : Error trying to run query: ALTER
TABLE g2_QuotasMap
  DROP INDEX g2_QuotasMap_48775,
  MODIFY COLUMN g_userOrGroupId int(11) NOT NULL,
  ADD PRIMARY KEY(g_userOrGroupId)in
modules/core/classes/GalleryStorage/DatabaseStorageExtras.class at
line 1508 (gallerystatus::error) 
in modules/core/classes/GalleryStorage/DatabaseStorageExtras.class
at line 1268 (databasestorageextras::_executesql) 
in modules/core/classes/GalleryStorage/DatabaseStorage.class at
line 541 (databasestorageextras::configurestore) 
in modules/core/classes/GalleryStorage.class at line 391
(mysqldatabasestorage::configurestore) 
in modules/core/classes/GalleryModule.class at line 182
(gallerystorage::configurestore) 
in upgrade/steps/UpgradeOtherModulesStep.class at line 71
(quotasmodule::installorupgrade) 
in upgrade/index.php at line 183
(upgradeothermodulesstep::processrequest) 

realpath(/home/galerea/public_html/modules/core/classes/../../../)
      

Thank you for your help.

P.S.: I have tried to Delete database cache but it did not help.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-11-26 02:19

hmm, if you don't mind losing the quotas you already assigned, i'd recommend truncating (deleting all rows of) the g2_QuotasMap table.

 
galerea
galerea's picture

Joined: 2005-10-16
Posts: 14
Posted: Sat, 2005-11-26 03:03

It worked, thanks valiant! ))

P.S.: I wanted to do that but was affraid it might affect other functions of G2.