bugSamizdat - Bugs: bug #20303, editing with basic interface...

 
 

bug #20303: editing with basic interface destroys previous format - two-line fix proposed

Submitter:  Boud Roukema <boud>
Submitted:  Sat 30 Jun 2007 10:03:11 PM UTC
   
 
Category:  None Severity:  3 - Normal
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 04 Nov 2007 01:21:39 PM UTC, comment #3: 
Boud Roukema <boud>
Group Member
Mon 20 Aug 2007 11:01:29 PM UTC, comment #2: 

seems ok to me

Boud Roukema <boud>
Group Member
Sat 18 Aug 2007 06:02:52 PM UTC, comment #1: 

Fixed in snapshot 2007-08-18.

"cut the knot" kind of solution applied: the whole option, and a couple of others, are made available in basic interface; eventually, I'd like to get rid of the basic/advanced interface plit, advanced interface is only there because some parts of Samizdat UI are more complicated than they should be.

Dmitry Borodaenko <angdraug>
Group administrator
Sat 30 Jun 2007 10:03:11 PM UTC, original submission:  

PROBLEM:
Someone publishes an article with format e.g. textile or html, using the advanced interface to select the format, and sets open editing = true.

Someone else with a login and using the basic interface tries editing the article. S/he previews and sees that the article is not rendered as (textile or html). If s/he confirms, then the article is updated with format = nil.

LIKELY EFFECT:
The user probably will notice the problem. S/he might: become discouraged and say that samizdat is too complicated; edit away all the textile/html markings :P since "clearly" they shouldn't be there. Almost certainly this will create confusion and frustration. The user will not necessarily think of clicking on "settings", "advanced settings" and returning to the editing window.

PROPOSED FIX:

i think the problem is only with the format parameter; e.g. lang doesn't have this problem. There might be a neater way of solving this, but my suggestion is to post a hidden field with the old format value, whatever that may be.

It seems to work for me.

This is against 070618, but the bug was there for quite some time.

--- /tmp/tmp_snapshot/samizdat/lib/samizdat/controllers/message_controller.rb 2007-06-18 13:01:02.000000000 +0200
+++ /usr/lib/ruby/1.8/samizdat/controllers/message_controller.rb 2007-06-30 23:46:36.197804000 +0200
@@ -364,6 +402,8 @@
           [:checkbox, 'open', @message.open,
             (options.include?(:disable_open) ? :disabled : nil)]
       )
+    else  # keep old values even with basic interface
+      fields.push([:hidden, 'format',  @old_content.format ])
     end
 
     fields.push([:br], [:submit, 'preview', _('Preview')])


Boud Roukema <boud>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by angdraug (Posted a comment)
  • -email is unavailable- added by boud (Submitted the item)
  •  

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-04 boud Open/ClosedOpen Closed
    2007-08-18 angdraug StatusWorks For Me Fixed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code