Closed (fixed)
Project:
Path redirect
Version:
6.x-1.0-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2009 at 15:47 UTC
Updated:
21 Mar 2009 at 10:10 UTC
user warning: Unknown column 'language' in 'where clause' query: SELECT * FROM path_redirect WHERE path = 'admin/reports/updates' AND (language = 'de' OR language = '') ORDER BY language DESC LIMIT 0, 1 in /var/www/servers/mfbfoto/sites/all/modules/path_redirect/path_redirect.module on line 235.
Comments
Comment #1
dave reidRun update.php. :)
Comment #2
jkatinger commentedDid that several times...no joy!
Comment #3
dave reidOk, go to update.php, and manually select '6101' from the 'path_redirect' option under 'Select versions' and then run. Not sure why the update did not work for anyone. Worked just fine on all of my websites.
Comment #4
bennos commentedalso worked for me.
think can be marked as fixed.
Comment #5
Paul Iliano commentedI had the same error "user warning: Unknown column 'language' in 'where clause' query: SELECT * FROM path_redirect WHERE path = 'admin/reports/updates' AND (language = 'en' OR language = '') ORDER BY language DESC LIMIT 0, 1 in /home/ilianone/public_html/sites/all/modules/path_redirect/path_redirect.module on line 235."
Indeed, I had forgotten to run update.php (sorry), but did so immediately after seeing that error, not selecting a specific update.
Update.php report screen threw up the error "user warning: Can't DROP 'path'; check that column/key exists query: ALTER TABLE path_redirect DROP KEY path in /home/ilianone/public_html/includes/database.mysql-common.inc on line 417." and lower on the same screen "Update #6101 * Failed: ALTER TABLE {path_redirect} DROP KEY path".
So I came to drupal.org and found this issue thread. As advised here above, I ran update.php again this time selecting specifically update 6101. Now I have even more errors:
* user warning: Can't DROP 'path'; check that column/key exists query: ALTER TABLE path_redirect DROP KEY path in /home/ilianone/public_html/includes/database.mysql-common.inc on line 417.
* user warning: Duplicate column name 'language' query: ALTER TABLE path_redirect ADD `language` VARCHAR(12) NOT NULL DEFAULT '' in /home/ilianone/public_html/includes/database.mysql-common.inc on line 298.
* user warning: Duplicate key name 'path_language' query: ALTER TABLE path_redirect ADD UNIQUE KEY path_language (path, language) in /home/ilianone/public_html/includes/database.mysql-common.inc on line 403.
and
Update #6101
* Failed: ALTER TABLE {path_redirect} DROP KEY path
* Failed: ALTER TABLE {path_redirect} ADD `language` VARCHAR(12) NOT NULL DEFAULT ''
* Failed: ALTER TABLE {path_redirect} ADD UNIQUE KEY path_language (path, language)
Using phpmyadmin I can see the 'path' field in table path_redirect and see it contains the paths. Should I simply drop this field (I'm hesitant because it contains the paths)? Or do something else?
Many thanks in advance for any help as I'm stuck,
Paul
Comment #6
todd nienkerk commentedI also experienced this error when I installed the module. Here are the two errors from installation:
Disabling, uninstalling, and re-enabling the module resulted in no errors.
Comment #7
dave reid@Paul: No, don't drop the path field, it's very much a required column. The error you saw referred to a database index on the path field that happens to be called 'path'.
@Todd That sounds like you had path_redirect installed at one point but never uninstalled it to remove the table. The only time the module should try and CREATE TABLE is during a first-install/enable. :/
Not sure why everyone's having problems. I updated for 6.x-1.0-beta1 to 6.x-1.0-beta3 on all my sites with no problems. If you don't run update.php right away, you'll get an error about an undefined 'language' column, but there's really not something that can be helped since we needed to add multilingual support.
Comment #8
Paul Iliano commentedThanks Dave.
Can you please advise what I need to do now, so that I can move on and put my site in production again?
Should I try to drop that database index called 'path'? If so, how do I do that?
Or is it OK to do nothing and just disregard the error messages?
Something else?
Many thanks in advance,
Paul
Comment #9
dave reid@Paul If everything updated successfully, you should have an index called path_language (NOTE: this is different from the actual database's columns named path and language). If you do, then you don't need to do anything.
Comment #10
Paul Iliano commentedThanks Dave. Indeed, I have an index called 'path_language', plus an index called 'rid'.
So it seems all is well. I think the issue can be closed now, so I'll do so.
Thanks very much for your help!