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

 
 

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

Submitted by:  Boud Roukema <boud>
Submitted on:  Sat 30 Jun 2007 10:03:11 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Status: FixedPrivacy: Public
Assigned to: NoneOpen/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 04 Nov 2007 01:21:39 PM UTC, comment #3:

closed - no objections:
http://lists.gnu.org/archive/html/samizdat-devel/2007-10/msg00000.html

Boud Roukema <boud>
Project Member
Mon 20 Aug 2007 11:01:29 PM UTC, comment #2:

seems ok to me

Boud Roukema <boud>
Project 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>
Project 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>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 04 Nov 2007 01:21:39 PM UTCboudOpen/ClosedOpen=>Closed
    Sat 18 Aug 2007 06:02:52 PM UTCangdraugStatusWorks For Me=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1