SiT! Bugs - SiT!
View Issue Details
0000470SiT!incidentspublic2009-02-06 14:442010-03-01 09:49
nicdev 
ivan 
normalmajoralways
closedfixed 
3.41 
3.60 LTS3.50 
0000470: Drafts do not save correctly
When doing (mostly e-mail) the drafts are not saving correctly. We get the message "draft saved at..." but either the draft is blank or is missing some fields, like the "reply to" field.
No tags attached.
related to 0000628closed ivan autocomplete breaks with non-english characters 
Issue History
2009-02-06 14:44nicdevNew Issue
2009-02-07 13:36paulhNote Added: 0000589
2009-02-07 13:36paulhStatusnew => feedback
2009-02-09 08:33nicdevNote Added: 0000594
2009-02-09 08:35nicdevNote Added: 0000595
2009-02-09 08:35nicdevStatusfeedback => new
2009-02-09 15:29ivanNote Added: 0000599
2009-02-09 15:29ivanStatusnew => resolved
2009-02-09 15:29ivanResolutionopen => no change required
2009-02-09 15:29ivanFixed in Version => Current SVN
2009-02-27 13:58ivanFixed in VersionCurrent SVN => 3.45
2009-02-27 13:58ivanTarget Version => 3.45
2009-02-27 16:24ivanStatusresolved => closed
2009-03-20 09:41nicdevAssigned To => ivan
2009-03-20 09:41nicdevNote Added: 0000794
2009-03-20 09:41nicdevStatusclosed => feedback
2009-03-20 09:41nicdevResolutionno change required => reopened
2009-03-28 16:34ivanNote Added: 0000849
2009-03-28 16:34ivanAssigned Toivan => paulh
2009-03-28 16:34ivanStatusfeedback => assigned
2009-03-29 19:59paulhNote Added: 0000869
2009-04-03 10:05ivanRelationship addedrelated to 0000628
2009-04-03 10:06ivanNote Added: 0000887
2009-04-17 19:52paulhAssigned Topaulh => ivan
2009-08-05 13:45ivanNote Added: 0001506
2009-08-05 13:46ivanTarget Version3.45 => 3.60
2010-02-20 17:33paulhNote Added: 0002405
2010-02-25 21:22paulhNote Added: 0002495
2010-02-25 21:22paulhStatusassigned => feedback
2010-03-01 08:44nicdevNote Added: 0002552
2010-03-01 09:48ivanNote Added: 0002555
2010-03-01 09:48ivanStatusfeedback => resolved
2010-03-01 09:48ivanFixed in Version3.45 => 3.50
2010-03-01 09:48ivanResolutionreopened => fixed
2010-03-01 09:49ivanStatusresolved => closed

Notes
(0000589)
paulh   
2009-02-07 13:36   
The replyto field is fixed in SVN which other fields are missing?
(0000594)
nicdev   
2009-02-09 08:33   
Hi Paul, Actually we have different appearances. The worst is for one user, in his case the entire draft is blank... At first i thought it was his Laptop (Java etc.) but then i logged out at my desk, and logged him in in my station, and it still does not work for him, even though it works for me on the same station. This is the worst because even though it says "draft saved at xx:xx" when he tries to recall it he gets a completely blank save returned.

We have thought it may be a good idea to add a "save as draft" button that saves a draft to the users station when he needs to, without waiting for autosaves, that could give a more confident save.
(0000595)
nicdev   
2009-02-09 08:35   
It may be worth while to note that he uses the French interface, and i use the English ... not sure that makes a difference.
(0000599)
ivan   
2009-02-09 15:29   
Have tested drafts in svn and they work fine, saving all fields correctly. I've also added a small 'save' icon to allow saving of drafts manually. Drafts are saved every 10 seconds so this isn't really needed, but for the paranoid... :)
(0000794)
nicdev   
2009-03-20 09:41   
Hi Ivan, i have finally found the problem with this and i know why you could not recreate it. The user in question had a "รง" in his default signature, and this was the cause of all the problems. When i removed this the drafts started working immediately!

It seems there are still a lot of places where special characters are not escaped correctly. I found a lot of these in the access log of apache (it was a bit hidden in the autosave.php line):

Invalid multibyte sequence in argument in C:\\wamp\\www\\sit\\includes\\functions.inc.php @ line 5748

I am sure if you try this it will show up the same for you...
(0000849)
ivan   
2009-03-28 16:34   
I can confirm this with SiT svn r5272 drafts are completely empty when using non-ascii characters.

See http://sitracker.org/wiki/Development/Test_Data [^] for some strings to try.

Paul: can you take a look? I can't see where this is going wrong. thanks.
(0000869)
paulh   
2009-03-29 19:59   
It seems to be cleanvar which is causing this, in ajaxdata.php if I look at $_REQUEST['content'] it looks ok though cleanvar($_REQUEST['content']) is empty
(0000887)
ivan   
2009-04-03 10:06   
This is related to bug 628 because it's the cleanvar call that is messing up the character handling, still pondering what to do about it.
(0001506)
ivan   
2009-08-05 13:45   
Still an issue as of svn r5733
(0002405)
paulh   
2010-02-20 17:33   
Unable to repro with 3.51, a good number of fixes have been added to the drafts in 3.51 around utf8
(0002495)
paulh   
2010-02-25 21:22   
Unable to reproduce with latest code can people confirm before this one gets closed?
(0002552)
nicdev   
2010-03-01 08:44   
I confirm it is fixed what seems to be from 3.50 onwards. It can be closed.

Thanks
(0002555)
ivan   
2010-03-01 09:48   
Reported already fixed at 3.50. Thanks Nico.