Disable GUI Mode for wikis using rst markup

We use rst as the default markup on our wiki. If a user clicks on the GUI Mode button to edit a page, the result is a corrupted page. I propose that the GUI Mode be disabled for wikis that have the config option default_markup = 'rst'.

A GUI Mode that can handle rst is of interest, but is a separate feature request :-). Here is a patch

--- orig/MoinMoin/PageGraphicalEditor.py
+++ mod/MoinMoin/PageGraphicalEditor.py
@@ -73,6 +73,9 @@
             # Trying to edit an old version, this is not possible via
             # the web interface, but catch it just in case...
             msg = _('Cannot edit old revisions!')
+        elif self.request.cfg.default_markup == 'rst':
+            # FIXME: add i18n 
+            msg = 'GUI mode cannot be used to edit rst markup.'
         else:
             # try to acquire edit lock
             ok, edit_lock_message = self.lock.acquire()   

SethFalcon

First, the check is not good enough, since a page may use #format rst. Second, the error message above is not very helpful - there is no point in showing a link that will always give you an error message. If you visit a page using rst format (either because of page #format or wiki default format), the edit (gui) link should be disabled, with a title saying something like "rst format is not supported by the graphic editor". -- NirSoffer 2006-03-29 21:19:54

Is not this already handled by MoinMoin? I filed a bug report about it a few months ago. -- AlexanderSchremmer 2006-03-30 09:28:55

The ThemeBase class should handle this. See MoinMoin/theme/init.py:guiworks(). Which theme do you use?


CategoryFeatureImplemented

MoinMoin: FeatureRequests/DisableGuiModeForRst (last edited 2008-03-18 00:36:37 by JohannesBerg)