Closed (fixed)
Project:
Password Policy
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
31 May 2011 at 15:11 UTC
Updated:
9 Nov 2011 at 12:31 UTC
Jump to comment: Most recent file
After installing password policy 6.x-1.0, I then configured it by clicking the Add tab to add a policy.
After selecting length, etc for passwords, saving gave this error:
user warning: Column 'name' in field list is ambiguous query: SELECT name FROM role r INNER JOIN password_policy_role p ON r.rid = p.rid WHERE p.pid = 1 in /**********/sites/all/modules/password_policy/password_policy.admin.inc on line 117.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 1174318.sql-warning.patch | 654 bytes | wiifm |
Comments
Comment #1
mojzis commentedi have the same problem here, is there any help to it, please ?
Comment #2
Slovak commentedSame issue here....
Comment #3
hbergin commentedBoth the role table and password_policy_role table have a column called "name", which is the source of the "Column 'name' in field list is ambiguous query" error.
Prefixing the name in the field list with an r to specify the name should be taken from the role table should resolve this:
SELECT r.name FROM role r INNER JOIN password_policy_role p ON r.rid = p.rid WHERE p.pid = 1Comment #4
tivie commentedyes hbergin is right.
Just change line 117 from:
$result = db_query('SELECT name FROM {role} r INNER JOIN {password_policy_role} p ON r.rid = p.rid WHERE p.pid = %d', $pid);to
$result = db_query('SELECT r.name FROM {role} r INNER JOIN {password_policy_role} p ON r.rid = p.rid WHERE p.pid = %d', $pid);Comment #5
AlexisWilke commentedThank you for the fix. This is critical since the list of roles is required to be there.
Alexis Wilke
Comment #6
technikh commentedsubscribing..
Comment #7
wiifmSubscribe, can we get a new release rolled here? This is a little embarrassing for the module.
Can confirm that the two character fix mentioned above does fix the issue.
line 117 of password_policy.admin.inc :
Comment #8
wiifmsetting status
Comment #9
wiifmUploading a patch that is formatted correctly for drush make
Comment #10
halstead commentedRBTC from me as well.
Comment #11
erikwebb commentedPatched and committed as 6.x-1.1.
Comment #12
alexmartin commentedI ran in to this error yesterday so nice to see it's been addressed today. Thanks!
However, I've just installed 6.x-1.1, and I get the following error on update.php, even before running the update...
Warning: Call-time pass-by-reference has been deprecated in /var/www/vhosts/my-domain/httpdocs/sites/all/modules/password_policy/password_policy.install on line 305Comment #13
erikwebb commentedThis is being addressed in a separate issue - #1133216: Warning: Call-time pass-by-reference has been deprecated
I did not add this to the 6.x-1.1 release, because there was a critical bug that _had_ to be released. I made a lot of headway in the issue queue yesterday and will probably roll a 6.x-1.2 release by next week to address the issues I've resolved.