Description
I get an Convert Error when switch back and forth Text mode to Gui Mode (or trying to save in GUI mode, etc). on certain pages on my Wiki.
Steps to reproduce
I got it down to a small markup problem: An indented blockquote
{{ { Text, blah, blah }} }
Note, there is indented white space before the '{'s in the block quote.
Error Message
Illegal list element pre
If you want to report a bug, please save this page and attach it to your bug report.
8. usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in visit_element (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, node=<DOM Element: ul>) 1. 511 func = getattr(self, "process_%s" % name, None) 2. 512 if func: 3. 513 func(node) 4. 514 else: 5. 515 self.process_inline(node) * func = <bound method convert_tree.process_list of <Moin...erter.text_html_text_x_moin.convert_tree object>> * node = <DOM Element: ul> 9. /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in process_list (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, node=<DOM Element: ul>) 1. 626 self.process_dl(i) 2. 627 else: 3. 628 raise ConvertError("Illegal list element %s" % i.localName) 4. 629 self.depth -= 1 5. 630 if self.depth == 0: * global ConvertError = <class MoinMoin.converter.text_html_text_x_moin.ConvertError> * i = <DOM Element: pre> * i.localName = u'pre' ConvertError Illegal list element pre * exceptions = <bound method ConvertError.exceptions of <MoinMo...ter.text_html_text_x_moin.ConvertError instance>> * innerException = (None, None, None) * message = u'Illegal list element pre' * name = 'MoinMoin Convert Error'
MoinMoin Version |
1.5.3 |
OS and Version |
Debian Linux Sarge |
Python Version |
2.3 |
Server Setup |
Apache2 |
Server Details |
|
Workaround
I tested this on the MoinMoin site and it works. The side effect is that after switching back to text, I notice that the Convert process inserted a unbulleted list markup in front of the '{'s.
. {{ [ text, blah blah }} }
Discussion
I think this has been fixed in the unreleased code, since it works here but not in a fresh 1.5.3 code tree.
I have more data here. The problem is self-inflicted on my Wiki. There was a post in the moin-user list (but no Wiki Bug submitted) about Paragraph breaks not working in indented mark-up. The thread posted a 1-line fix to the _indent_repl function in wiki.py
#if not (self.in_li or self.in_dd): if self.in_li or self.in_dd:
Although this fixes the following case:
- This is an indented paragraph This should be another paragraph but ends up combined with previous line.
It breaks any indented paragraph or blockquote when switch Text Mode->Gui Mode and then back.
So, could somebody please look at the MoinMoinBugs/ParagraphBreaksBrokenWhenIndented bug and/or this one to fix the issue?
Plan
- Priority:
- Assigned to:
- Status: