Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '...drupal7.aes_passwords' doesn't exist: SELECT uid, pass FROM aes_passwords WHERE uid != :uid; Array ( [:uid] => 0 ) in aes_config_submit() (line 278 of .../sites/all/modules/aes/aes.module).
the issue here is that my database table name is "...drupal7.main_aes_passwords", not "...drupal7.aes_passwords". "Main_" is my database prefix. aes_config_submit() doesn't take into account if a user has a prefix or not.
looking at the code; "SELECT ... FROM aes_passwords WHERE" is hardcoded. it should be "FROM {aes_password}" so drupal can automatically insert the prefix. i replaced 5 occurances of this on my installation of aes. just fyi.
Comment | File | Size | Author |
---|---|---|---|
#4 | 1206698-4-database-table.patch | 2.22 KB | EvanDonovan |
#3 | aes.module (2).zip | 6.75 KB | ledut |
#2 | aes.module.zip | 6.75 KB | ledut |
Comments
Comment #1
ledut CreditAttribution: ledut commentedI update the bug priority from normal to critical because some major system features permanently and totaly fail because of this bug :
Several pages are not displayed at all, only the error warning is printed.
Drupal core failing features are :
- new user can't be create (check on : user/add)
- existing users can't be edited because the user profile page fails (check on : user/1/edit)
It affects all users, even if the "AES password" setting is disabled.
Maybe more user features could be affected (deleting users, editing multiple users).
Tested on drupal 7.7
Comment #2
ledut CreditAttribution: ledut commentedThe corrected aes.module file.
Comment #3
ledut CreditAttribution: ledut commentedIgnore previous post : this file is the one.
Comment #4
EvanDonovan CreditAttribution: EvanDonovan commentedHere's the change needed in patch form. (Zip files are not accepted as a means of communicating changes.)
Comment #5
EvanDonovan CreditAttribution: EvanDonovan commentedTagging.
Comment #6
tstoecklerDefinitely RTBC.
Comment #7
EvanDonovan CreditAttribution: EvanDonovan commentedThanks!
Comment #8
EvanDonovan CreditAttribution: EvanDonovan commentedCommitted to -dev: http://drupalcode.org/project/aes.git/commit/0553dee