After disabling the module, re-enabling it produces the following errors :
user warning: Table 'privatemsg_folder' already exists query: CREATE TABLE privatemsg_folder ( fid int(10) unsigned NOT NULL auto_increment primary key, uid int(10) unsigned NOT NULL, name varchar(255) NOT NULL ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /............../includes/database.mysql.inc on line 121.
user warning: Duplicate entry '1' for key 1 query: INSERT INTO privatemsg_folder VALUES (1, 0, 'Sent') in /.............../includes/database.mysql.inc on line 121.
user warning: Table 'privatemsg_archive' already exists query: CREATE TABLE privatemsg_archive ( id int(10) unsigned NOT NULL auto_increment primary key, author int(10) unsigned NOT NULL, recipient int(10) unsigned NOT NULL, subject VARCHAR(64) NOT NULL, message text NOT NULL, timestamp int(11) unsigned NOT NULL, hostname varchar(255) NOT NULL, folder int(10) unsigned NOT NULL, format int(4) NOT NULL DEFAULT '0', key (recipient) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /............................/includes/database.mysql.inc on line 121.
Even after 1- disabling the module 2- manually dropping the 3 tables and renabling the module, I get errors.
Comments
Comment #1
mindless commentedhow are you disabling the module? disable/reenable in admin/modules should not run the sql in privatemsg.install again, unless you deleted the row for privatemsg in the system table. Reenable works fine for me.
What error do you get if you drop the 3 tables and enable the module?
Comment #2
Chill35 commentedExactly what I got above.
Comment #3
mindless commentedsorry, don't really have anything to suggest.. drop the tables, remove the row for privatemsg in your system table, try reinstalling the module. maybe add debug output to see if the CREATE TABLE things are happening twice if you continue to have trouble.
Comment #4
Chill35 commentedI just ran into the same problems again.
Privatemsg just does not work. I had a fresh install. Now with all three tables dropped (deleted), the privatemsg module folder deleted, the module disabled (of course) I am getting errors throughout my web site.
Comment #5
mindless commentedsorry, difficult to help without more information.
Comment #6
Chill35 commentedHere is how to replicate the problem :
- install privatemsg module...
- disable it
- drop all three tables
- re-install it
It will tell you that the tables do not exist. privatemsg cannot deal with re-creating the tables when all three have been dropped.
Comment #7
Chill35 commentedThis is related to this other issue : http://drupal.org/node/86830
Comment #8
mindless commentedThe steps you list are not a bug. When you disable a module drupal still remembers that you had installed it before, so when you reactivate it does not try to create the tables again. If you drop the tables you must also remove the row for privatemsg from the system table. This will tell drupal the module is uninstalled, and reactivate WILL create the tables again. In drupal 5.x you can pick the "uninstall" tab from admin/modules section.. if 4.7.x you must remove the row in the system table manually.
Comment #9
Chill35 commentedThank you.