Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I freshly installed the latest 6.x-2.x-dev version, and I'm getting an error message:
User warning: Table 'austin.pm_setting' doesn't exist query: SELECT pms.type, pms.id, pms.value FROM pm_setting pms WHERE (pms.setting = 'disabled') AND ((pms.type = 'user' AND pms.id IN (1)) OR (pms.type = 'role' AND pms.id IN (2)) OR (pms.type = 'global' AND pms.id IN (0))) in _db_query() (line 147 of C:\wamp\www\austin\includes\database.mysqli.inc).
It seems that the pm_setting table doesn't exist/wasn't created upon install.
Comments
Comment #1
mrmofo CreditAttribution: mrmofo commentedI got the same error message upgrading from the previous dev release to this latest one.
Comment #2
BerdirAre you sure that you did run update.php *and* did not have any patches applied that added update functions?
Comment #3
kevstav13 CreditAttribution: kevstav13 commentedI did run update.php, and hadn't done any patches to it. For me, I uninstalled a previous version then installed the latest dev version and started getting this error message. If it matters, I'm running Pressflow.
Comment #4
BerdirWhat exactly do you mean with uninstalling? Just removing from the file system or anything else?
Have a look at the {system} table, search the row for privatemsg (name column) and report the value of the schema version.
Comment #5
kevstav13 CreditAttribution: kevstav13 commentedI uninstalled by disabling the module first, then going to the uninstall tab of the modules list and uninstalled it that way, then deleted the file system, then copied the new one in, enabled, etc.
I'm on schema version 6199
Comment #6
BerdirThat is unecessary and wrong.
Uninstalling the module deletes all data (private messages and so on).
You just need to delete the privatemsg folder and then upload the new one and run update.php. Disabling/Uninstalling is unecessary. (It is however recommended to put your site into offline mode if it is a public site that is frequently accessed). This is true for all contributed modules unless they explicitly tell you something else.
6199 is strange, there was never such an update. Are you sure that update.php does not report anything nor that there are/were any errors?
Comment #7
kevstav13 CreditAttribution: kevstav13 commentedWhen I ran update the first time there weren't any errors, and I just ran update.php again and it changed the schema to 6206, and now no more error! Thanks for the help!
Comment #8
kevstav13 CreditAttribution: kevstav13 commentedComment #9
savioret CreditAttribution: savioret commentedI updated from 6.x-2.x-dev_2010-Feb-26 to 6.x-2.x-dev_2011-Jun-25
I can notice two issues, pm_setting table is created after the update querys, and the alter table of #6201 fails.
Seems that pm_email_notify_update_6201() is called before creating the pm_setting table.
I ran update.php a this was the result:
------------------------------
user warning: Table 'pm_setting' doesn't exist query: UPDATE pm_setting SET value = -1 WHERE type = 'user' AND id = 4 AND setting = 'email_notify_level' in /www/branch/modules/privatemsg/privatemsg.module on line 3045.
[...] This warning is repeated hundreds of times
[...]
user warning: Can't DROP 'list'; check that column/key exists query: ALTER TABLE pm_index DROP INDEX list in /www/branch/includes/database.mysql-common.inc on line 456.
user warning: Can't DROP 'messages'; check that column/key exists query: ALTER TABLE pm_index DROP INDEX messages in /www/branch/includes/database.mysql-common.inc on line 456.
user warning: Can't DROP 'participants'; check that column/key exists query: ALTER TABLE pm_index DROP INDEX participants in /www/branch/includes/database.mysql-common.inc on line 456.
pm_email_notify module
Update #6201
DROP TABLE {pm_email_notify}
privatemsg module
Update #6200
No queries
Update #6201
Failed: ALTER TABLE {pm_index} DROP INDEX list
Failed: ALTER TABLE {pm_index} DROP INDEX messages
Failed: ALTER TABLE {pm_index} DROP INDEX participants
ALTER TABLE {pm_index} CHANGE `uid` `recipient` INT unsigned NOT NULL
ALTER TABLE {pm_index} ADD `type` VARCHAR(255) NOT NULL DEFAULT 'user', ADD INDEX list (recipient, type, deleted, is_new), ADD INDEX messages (mid, recipient, type), ADD INDEX participants (thread_id, recipient, type, deleted)
Update #6202
No queries
Update #6203
ALTER TABLE {pm_index} ADD PRIMARY KEY (mid, recipient, type)
Update #6204
ALTER TABLE {pm_index} DROP INDEX mid
ALTER TABLE {pm_index} DROP INDEX thread_id
ALTER TABLE {pm_index} DROP INDEX is_new
ALTER TABLE {pm_message} DROP INDEX author
ALTER TABLE {pm_message} DROP INDEX subject
ALTER TABLE {pm_message} DROP INDEX timestamp
Update #6205
CREATE TABLE {pm_setting} ( `id` INT unsigned NOT NULL, `type` VARCHAR(128) NOT NULL, `setting` VARCHAR(128) NOT NULL, `value` INT DEFAULT NULL, PRIMARY KEY (id, type, setting) ) /*!40100 DEFAULT CHARACTER SET utf8 */
Update #6206
DROP TABLE {pm_disable}
Comment #10
BerdirThe ALTER errors are unrelated and actually shouldn't fail anymore because that is now checked, strange.
Anyway, that explains the problem. update function depencies are a mess in 6.x, I'll look into it.
Comment #11
savioret CreditAttribution: savioret commentedThank you.
Comment #12
fuzzy76 CreditAttribution: fuzzy76 commentedAny news on this? We are getting a wall of error messages on upgrade from 6.x-1.5 about missing pm_setting.
Comment #13
oadaeh CreditAttribution: oadaeh as a volunteer commentedThis issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-1.x branch (bug fixes only) or the 7.x-2.x branch.
Thank you.