'''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 <<DateTime(2006-03-29T21:19:54Z)>>


Is not this already handled by MoinMoin? I filed a bug report about it a few months ago. -- AlexanderSchremmer <<DateTime(2006-03-30T09:28:55Z)>>

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

----
CategoryFeatureImplemented