Trying to update from 6.x-2.3 to 6.x-2.4 and the database update fails with a bunch of index errors.
Here is a fascinating but disillusioning excerpt:
Unknown column 'weight' in 'field list' query: SELECT url, weight, last_status, last_checked, click_count, last_click FROM weblinks WHERE nid = 5395 AND vid=5395 in /usr/local/apache2/vhosts/kpbj.com/htdocs/sites/all/modules/weblinks/weblinks.module on line 359
Unknown column 'bw.weight' in 'field list' query: SELECT DISTINCT(n.nid), bw.weight, n.title FROM node n INNER JOIN node_revisions nr ON nr.vid = n.vid INNER JOIN weblinks bw ON bw.vid = nr.vid LEFT JOIN term_node tn ON tn.nid=n.nid AND tn.vid=n.vid WHERE n.status = 1 AND tn.tid IN (432) ORDER BY bw.weight ASC, n.title ASC in /usr/local/apache2/vhosts/kpbj.com/htdocs/sites/all/modules/weblinks/weblinks.module on line 1150.
http://kpbj.com/update.php?id=3&op=do|http://kpbj.com/update.php?op=start&id=3|1||Duplicate column name 'urlhash' query: ALTER TABLE weblinks ADD `urlhash` CHAR(32) NOT NULL DEFAULT '' in /usr/local/apache2/vhosts/kpbj.com/htdocs/includes/database.mysql-common.inc on line 306.
Dec 6 23:32:34 piperhosting drupal: http://kpbj.com|1323243154|php|69.11.11.111|http://kpbj.com/update.php?id=3&op=do|http://kpbj.com/update.php?op=start&id=3|1||Duplicate key name 'urlhash' query: ALTER TABLE weblinks ADD INDEX urlhash (urlhash) in /usr/local/apache2/vhosts/kpbj.com/htdocs/includes/database.mysql-common.inc on line 442.
Dec 6 23:32:34 piperhosting drupal: http://kpbj.com|1323243154|php|69.11.11.111|http://kpbj.com/update.php?id=3&op=do|http://kpbj.com/update.php?op=start&id=3|1||Duplicate key name 'last_checked' query: ALTER TABLE weblinks ADD INDEX last_checked (last_checked) in /usr/local/apache2/vhosts/kpbj.com/htdocs/includes/database.mysql-common.inc on line 442.
Dec 6 23:32:34 piperhosting drupal: http://kpbj.com|1323243154|php|69.11.11.111|http://kpbj.com/update.php?id=3&op=do|http://kpbj.com/update.php?op=start&id=3|1||Can't DROP 'weight'; check that column/key exists query: ALTER TABLE weblinks DROP weight in /usr/local/apache2/vhosts/kpbj.com/htdocs/includes/database.mysql-common.inc on line 330.
The resulting update has a link page with categories but no links. Reverting back works to fix it. Hope someone else has a screenshot to help ya but I don't have time to reproduce it again for ya right this minute.
Drupal 6.22, MySQL 5.5.15, PHP 5.2.17, Apache 2.2.20
Comments
Comment #1
miguel_angel commentedSame issue here.
Screenshots attached.
Drupal 6.22, MySQL 5.0.91, PHP 5.2.16, Apache 2.2.17
Comment #2
ronline commentedThe same here
Comment #3
GStegemann commentedAnd here as well.
Comment #4
bigcrunch commentedThe same bug.
Comment #5
evelien commented+1 subscribe
Comment #6
BasH commented+1 subscribe, and of course this kind of warnings after continuing...:
user warning: Unknown column 'weight' in 'field list' query: SELECT url, weight, last_status, last_checked, click_count, last_click FROM weblinks WHERE nid = 46 AND vid=46 in weblinks.module on line 359.
Comment #7
mlammerts commented+1 subscribe
Comment #8
witali commentedSame error and after that the URLs are not shown any more,... Previous settings seem to get erased.
Comment #9
mdlueck commentedSubscribe... gggrrr.... rolling back the DB and mod I guess... yee haa at 21:30 and counting...
Comment #10
ajgarlag commented+1
My log
Comment #11
peacog commentedIt looks to me like this 6.x-2.4 release is actually 6.x-1.6. If you look in weblinks.install you'll see that the last hook_update_N is hook_update_6109, when it fact it should be hook_update_6116. Also, this version of weblinks.module is identical to the 6.x-1.6 version. It looks like something went wrong packaging up the new release.
Comment #12
gregarios commentedUnfortunately the release was not accompanied by a 6.x-2.x-dev update. I wish the maintainer would just fix it and release it correctly.
Comment #13
powery commentedsubscribe
Comment #14
aa461 commentedSubscribe
Comment #15
nancydruStop subscribing, start following
Comment #16
IreneKraus commentedThis is my problem too. On my one site, doing a complete removal and then re-install seems to have resolved most of the errors there. Oddly enough, the same did not occur when I did it on my own site! When I try to create a weblink now, I get these errors:
Before anyone asks, this was indeed supposed to be a weblink pointing to where one can download FileZilla. The link info keeps getting wiped out of the record when I go to save. It looks like I'm doing a database roll-back myself and sticking with the older version of this module!
Comment #17
andrebonfanti commented+1
Comment #18
miguel_angel commentedPlease, use the "Follow" button at top instead of empty comments, as NancyDru said at #15.
Thank you
Comment #19
gregarios commentedLooks like on Drupal's forums they've just substituted half the "subscribe" comments for "slap on the hand" comments by adding that "follow" button. I for one welcome the "subscribe" comments because it keeps important issues fresh in the list. ;-)
Comment #20
va3pc commentedAny fix for this yet? I finally upgraded to Drush on my D6 site a few months back, and didn't see anything untoward when upgrading until all the links vaporized. I dropped back a weblinks version and they all reappeared. Suffice to say I can't "drush up" again with impunity until this is resolved.
Comment #21
ronline commentedDoes the maintainer feel concerned ? 20 days has gone and his official release is knocking out whole weblinks functionality.
Comment #22
dm2243 commentedagreed - i have the same problem and i'm wondering why this version is still public. :(
Comment #23
miklosandras commentedQuick solution:
Go to phpmyadmin and execute this sql:
ALTER TABLE `weblinks` ADD `weight` VARCHAR( 30 ) NOT NULL;
Table name can be different (like, it can have prefix).
I don't know, what was the type of the column weight.
Comment #24
va3pc commentedThanks for the tip, I updated the table and now I can save new links.
Cheers
Paul
Comment #25
Dr Faustus commentedMore precisely, the SQL statement is:
ALTER TABLE `weblinks` ADD `weight` tinyint(4) NOT NULL DEFAULT '0';
If the backup_migrate module is installed, save a text file with the statement and restore it to solve the problem quickly
Cheers
Comment #26
kalanhThis SQL query posted earlier fixes the error message, but links but only display for admins through admin/content/weblinks. Also, the links-embed input filter no longer works, displaying instead the raw markers:
[links-embed: 2] [links-embed: 3] [links-embed: 4], etc.
I tried disabling and re-enabling the Web Links Filter sub-module and Weblinks parent module with no luck. In the end, I just restored a DB backup and reverted the previous Weblinks module source code.
Comment #27
gregarios commentedAny "fixes" for this will only be patches against 6.x-1.x...
I'm afraid the only "fix" possible is to re-submit the correct 6.x-2.4 version as 6.x-2.5, and this is entirely in the maintainer's hands since nobody has seen the changes that were supposed to occur in the 6.x-2.4 version.
This version, as Peacog wrote in comment #11 above, appears to be an older version submitted accidentally.
My advice to everyone is to revert back to version 6.x-2.3 and stop trying to fix this messed up archive submission.
Comment #28
izmeez commented#11 & #27 - You are so right, this is a regression. See the repository viewer,
http://drupalcode.org/project/weblinks.git/shortlog/refs/tags/6.x-2.4
Comment #29
Anonymous (not verified) commented+1 subscribe
Comment #30
nancydruStop subscribing, start following
Comment #31
gregarios commentedHey NancyDru, maybe you could stop your campaign to get on people's cases about subscribing long enough to fix this module you are listed as a maintainer for? ;-)
Comment #32
nancydruIt is not MY campaign - it originated in core. If I didn't get useless email notices about people subscribing, I might have time to learn Git so I can get back to maintaining modules.
Comment #33
bdillahu commentedJust in case you're trying to recover from this, I also found that reverting to 2.3 and re-running the update.php script got me going again without having to back off the database. Not sure it's perfect, but gets my site back up.
Comment #34
elfcurry commentedI also reverted to 6.x-2.3 and ran update.php and it seems to work.
Wouldn't it make more sense NOT to recommend people to upgrade to 2.4 while this problem exists?
Comment #35
gregarios commentedWouldn't it make more sense NOT to recommend people to upgrade to 2.4 while this problem exists?
People looking in the issues will most likely have already tried to upgrade. Those that look here first will also find this. It's a moot point. But since the issues are primarily for people already experiencing problems, then reverting to 6.x-2.3 would be the correct solution.
Comment #36
elfcurry commentedI don't quite understand you.
I had a problem because my 'Available Updates' report recommends me to update to 6.x-2.4 but this is unhelpful while the version causes a problem. Maybe it doesn't affect all sites but I was on 2.3 which works, so I'd have done better to ignore the recommendation and stick with 2.3.
Comment #37
gregarios commentedOnly the maintainer can update the Drupal module so your "Available Updates" can list the correct one. I'm hoping the maintainer updates this module correctly, immediately if not sooner. :-)
Feel free to contact him and complain.
Comment #38
verta commentedI am now "following" this issue as requested, but I find it more constructive to post that I to have experienced the problem and am more than happy to test any new release to see if it works better. I have been trying to get off dev releases where I can except real dev sites, and was not expecting it to blow up going from dev 2.2 to released 2.4.
Comment #39
hansrossel commentedSame issue here and quite obvious why it's not working, the .install file of 2.4 has only the db updates of version 1.4, wondering if this module is still maintained: #1468830: Is Weblinks still being maintained?. Also wondering what will happen to new sites that base themselves on this version with wrong database schema.
Comment #40
nancydruI am still learning Git and need to take care of security issues in another module, then I'll try to fix this, if Robert doesn't get to it first.
Comment #41
mcurry commentedBit in the behind by this, I was. Please, please, module maintainers: withdraw 2.4 as a recommended version until this is fixed. See: #1479538: Revert to 6.x-2.3 as recommended version until upgrade issues are resolved
Comment #42
hansrossel commented@NancyDru, you don't need to know git to put a red message on the project page referring to this issue and asking people to install 2.3 and not upgrade to 2.4 until this issue is resolved.
Comment #43
nancydruYou are correct. Done.
Comment #44
gregarios commentedYou could change the 2.4 release note to include "ALERT - DO NOT INSTALL THIS UPDATE - IT IS BROKEN!" as well.
Comment #45
nancydruDone
Comment #46
gregarios commentedI know the basics of Git, and have made quite a number of updates to the Bad Behavior module using it over the last year. If you like, please make me a co-maintainer for this module so I can just put up the 2.3 version as a 2.5 and call it good. Or if you want to zip up and attach the real 2.4 to this thread as it was meant to go up I can use that. Would that work?
Comment #47
nancydruI don't own this modules, so I can't set maintainers. I don't know if I have 2.4 as intended.
Comment #48
gregarios commentedWould you like me to give you a cheat sheet I use for running a standard update in Git? I can give you the exact steps I would take to get the 2.3 version to replace the current -dev version and create a new 2.5 out of it.
Comment #49
gregarios commentedHere is exactly what I would do if I were you. Use it with discretion as needed... there's nothing private in this anyway that isn't found on your profile page:
Let me know if you have any questions.
Comment #50
jonathan1055 commentedI raised #1369850: contrib checker module missing or moved? back in December and if I recall, observed that the source code seems to have moved backwards to an older version. Maybe this was noted in the full thread above but I did not see it. Just posting this to see if it helps.
Jonathan
Comment #51
jonathan1055 commentedFollowing on from my previous post, just spotted in #11 that this was noticed. I can confirm that .module and .install in the 2.4 release are identical to the 1.6 release of May 2009. Hope this is useful info. Let me know if I can do anything else to help.
Jonathan
Comment #52
lostchord commentedMy problems with this module started when I upgraded from Drupal 6.22 to Drupal 6.24 while migrating from Fedora 14 to Fedora 15. I am seeing a number of other core related problems - mainly with the user module - that may be related to this. I run site specific modules directories and I did not update this module as part of the upgrade.
Comment #53
izmeez commentedThanks to earlier comments from others we never did "upgrade" to 6.x-2.4 which is clearly shown to be a git tagging error to the 6.x-1.x branch of this module. See comment #28
It would be really helpful if someone could simply remove that tag and reference to 6.x-2.4
Meanwhile I am changing the title to hopefully help people who have not read all the earlier comments in this thread.
Comment #54
nancydruWell, let's see if we get a new -dev release in the morning.
Comment #55
gregarios commentedSomehow you let a patch file slip into the dev module...
Comment #56
nancydruProving my ignorance of Git. I think it's removed now. Other than that, how does the code look? It is still smaller than the 2.3 version.
Comment #57
gregarios commentedAll I can say is it didn't give me any errors with the database update, and it does seem to be working. :) I have not put up any new links, however. Others should weigh in I suppose.
Comment #58
izmeez commentedYes, the new weblinks-6.x-2.x-dev release updates without problems and appears to be working.
Comment #59
nancydruHas anyone else tested? Anyone willing to mark this RTBC?
Comment #60
jonathan1055 commentedI have tested the latest dev (at least the parts I use on my site) and it seems OK to me. I do not use any of the contribs apart from checker, just to let you know. Compared a couple of files, and the changes all seems reasonable. I am presuming that things were not committed to dev unless fairly well tested, so it should all be good to go.
I say yes, make a new release 2.5. I'd be happy to mark RTBC, if you are OK that I have only tested the core functions and checker.
Jonathan
Comment #61
nancydru6.x-2.5 is out
Comment #62
gregarios commentedThank you! I'll just put this baby to bed. :-)
Comment #63
mdlueck commented@NancyDru, fix confirmed. Thank you so much! :-)
Comment #64
summit commentedHi after 6.25, I still needed to do: http://drupal.org/node/1363410#comment-5457084
This to be able to use Web Links: Weight desc as a sort order within views.
Greetings, Martijn
Comment #65
nancydruMartijn, please open this as a new issue. Include your "schema_version" value from the system table, please.
There should not be a "weight" column in the Weblinks table any more. I strongly encourage the use of the Weight module if you need that feature.
Comment #66
summit commentedHi Nancy, thanks will do that!
Greetings, Martijn
Comment #66.0
summit commentedRemoved IP