Update failed, bug in voting_api.install

sinasquax - June 25, 2009 - 07:51
Project:Voting API
Version:6.x-2.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hello, there is a small bug which cause failure of module's update :

in voting_api.install, line 293, replace :

<?php
  db_drop_index
($ret, '{votingapi_vote}', 'content');
 
db_drop_index($ret, '{votingapi_vote}', 'content_vtype');
?>

by :

<?php
  db_drop_index
($ret, 'votingapi_vote', 'content');
 
db_drop_index($ret, 'votingapi_vote', 'content_vtype');
?>

#1

mcload - June 25, 2009 - 09:54

My update failed too. Received this error

The following queries were executed
votingapi module
Update #6101
Failed: ALTER TABLE {{votingapi_vote}} DROP INDEX content
Failed: ALTER TABLE {{votingapi_vote}} DROP INDEX content_vtype
ALTER TABLE {votingapi_vote} ADD INDEX content_uid_2 (content_type, uid)

#2

milesgillham - June 25, 2009 - 10:26

That diff as a patch.

Cheers,

Miles

AttachmentSize
votingapi-501720-1.patch 614 bytes

#3

eaton - June 25, 2009 - 14:04
Status:active» fixed

Checked into the dev release. thanks!

I won't be releasing a new version for this just yet, as it's a relatively minor issue in the last update, but this will be rolled into the 2.1 version when it comes out.

#4

hgmichna - June 25, 2009 - 16:04

Got the same error:

Drupal database update

user warning: Table 'winhlp.w_w_votingapi_vote' doesn't exist
query: ALTER TABLE w_w_votingapi_vote DROP INDEX content in /srv/www/vhosts/winhlp.com/httpdocs/includes/database.mysql-common.inc on line 448.

user warning: Table 'winhlp.w_w_votingapi_vote' doesn't exist
query: ALTER TABLE w_w_votingapi_vote DROP INDEX content_vtype in /srv/www/vhosts/winhlp.com/httpdocs/includes/database.mysql-common.inc on line 448.

Updates were attempted. [...]

The following queries were executed
votingapi module
Update #6101
Failed: ALTER TABLE {{votingapi_vote}} DROP INDEX content
Failed: ALTER TABLE {{votingapi_vote}} DROP INDEX content_vtype
ALTER TABLE {votingapi_vote} ADD INDEX content_uid_2 (content_type, uid)

I corrected the two SQL statements and ran them manually.

I guess I'm not the only one who did that. Will you be able to drop the two indices in the next version without showing an error if the indices have already been dropped?

#5

eaton - June 25, 2009 - 16:10

I guess I'm not the only one who did that. Will you be able to drop the two indices in the next version without showing an error if the indices have already been dropped?

Yes, there should be no problem with that.

#6

System Message - July 9, 2009 - 16:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#7

AgentD - September 24, 2009 - 00:09

I'm getting this in v2.3 (Drupal 6.14). It looks like the fix above isn't for 2.3, in looking at the .install file the lines appear corrected.

error: "The update process was aborted prematurely while running update #6101 in votingapi.module."

#8

AgentD - October 24, 2009 - 16:14
Status:closed» active

Turning to Active. Trying to update modules and keep getting this error.

v2.3 (Drupal 6.14)

Help is greatly appreciated.

Dan

 
 

Drupal is a registered trademark of Dries Buytaert.