Changes made to the following form elements in the user profile aren't being saved.

Running Drupal 4.6.5

-- Private message settings ------------------------
[] Allow private messages
Check this box to allow users to send you private messages.
[] Receive daily e-mail for unread messages
Check this box to receive e-mail notification for unread messages. Only one e-mail will be sent per day.

CommentFileSizeAuthor
#5 privatemsg_1.module21.86 KBsolipsist

Comments

fool2’s picture

I can confirm this behavior on 4.7 as well. Somehow the values are getting overwritten or lost. I'll take a look at the code.

fool2’s picture

4.7 issue and 4.6 issue have slightly different causes.

But more specifically, I need to know what kind of changes to the checkboxes are not being honored. Are you not able to disable the checkboxes? It looks like they should be on by default.

solipsist’s picture

I can't enable them. Checking them and clicking save doesn't save my changes.

fool2’s picture

I am unable to replicate this problem on 4.6

solipsist’s picture

StatusFileSize
new21.86 KB

Ok, weird, because it keeps happening.

My tables schemas are below. I've attached my copy of the module.

-- 
-- Table structure for table `privatemsg`
-- 

CREATE TABLE `privatemsg` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `author` int(10) unsigned NOT NULL default '0',
  `recipient` int(10) unsigned NOT NULL default '0',
  `subject` varchar(64) NOT NULL default '',
  `message` text,
  `timestamp` int(11) unsigned NOT NULL default '0',
  `newmsg` tinyint(3) unsigned NOT NULL default '0',
  `hostname` varchar(255) NOT NULL default '',
  `folder` int(10) unsigned NOT NULL default '0',
  `author_del` tinyint(3) unsigned NOT NULL default '0',
  `recipient_del` tinyint(3) unsigned NOT NULL default '0',
  `format` int(4) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `recipient` (`recipient`),
  KEY `folder` (`folder`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


-- 
-- Table structure for table `privatemsg_archive`
-- 

CREATE TABLE `privatemsg_archive` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `author` int(10) unsigned NOT NULL default '0',
  `recipient` int(10) unsigned NOT NULL default '0',
  `subject` varchar(64) NOT NULL default '',
  `message` text NOT NULL,
  `timestamp` int(11) unsigned NOT NULL default '0',
  `hostname` varchar(255) NOT NULL default '',
  `folder` int(10) unsigned NOT NULL default '0',
  `format` int(4) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `recipient` (`recipient`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



-- 
-- Table structure for table `privatemsg_folder`
-- 

CREATE TABLE `privatemsg_folder` (
  `fid` int(10) unsigned NOT NULL auto_increment,
  `uid` int(10) unsigned NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`fid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
salvatoreco’s picture

I've the same problem: when an user is editing his profile, in order to allow private messages, he must check everytime the "Allow private messages" box before clicking "save" because the box still unchecked even if the previous time user has checked it!
I've noticed that this bug came out when my provider replaced PHP4 with PHP5 and, at same time, I upgraded from 4.6.4 to 4.6.5.
(sorry for my bad English...)

salvatoreco’s picture

Little update about this bug: I've seen that just few users have this problem, while other users have the checkboxes checked correctly when they save them checked... amazing!

solipsist’s picture

Title: Doesn't save user settings » Doesn't save user settings, or rather, once unchecked always unchecked

The boxes are checked by default but if you uncheck them and click SUBMIT, they will get and remain unchecked. However if you go back to the Edit tab, check them and click SUBMIT, when you view the Edit tab again they remain empty and unchecked. Any clues?

salvatoreco’s picture

I solved using code posted here: http://drupal.org/node/37904, but as I don't "speak" PHP, I don't know how secure is this "patch"...

mindless’s picture

Status: Active » Fixed

I committed the fix for DRUPAL-4-6 from that linked report. I'm pretty sure the 4.7 issue was resolved a couple months ago.

Anonymous’s picture

Status: Fixed » Closed (fixed)