Description
When inserting an HTML document in MoinMoin that was made from a DocBook source with the DocBook-XSL stylesheets, the footnotes are badly formatted. Each footnote is displayed as if it was in a small box (see screenshot).
The same problem existed in Moin 1.5 when displaying a DocBook formated page (#format docbook). I did not check if it was still the case with Moin 1.6.0.
Steps to reproduce
You can use the following document: http://tigreraye.org/Petit-guide-du-traducteur.html (this document was made from this DocBook source: http://tigreraye.org/Petit-guide-du-traducteur.xml). Or any DocBook document including footnotes.
Put the document on an empty page preceding it with a #format html header.
Example
Component selection
- modern theme (and probably the other themes as well)
Details
MoinMoin Version |
1.6.0 |
OS and Version |
Linux (Debian Stable) |
Python Version |
2.4 |
Server Setup |
moin_flup_wsgi.py |
Server Details |
Lighttpd -> SCGI -> moin_flup_wsgi.py |
Language you are using the wiki in (set in the browser/UserPreferences) |
French |
Workaround
Just renaming the MoinMoin footnotes style to moin_footnotes fixes this issue:
Rename the footnotes style in the Modern style common.css file:
--- common.css.original 2008-01-22 21:57:03.000000000 +0100 +++ common.css 2008-01-22 21:57:40.000000000 +0100 @@ -134,17 +134,17 @@ .table-of-contents-heading { font-weight:bold; padding:0; margin:0; } -.footnotes div { +.moin_footnotes div { width: 5em; border-top: 1pt solid gray; } -.footnotes ol { +.moin_footnotes ol { padding: 0 2em; margin: 0 0 1em; } -.footnotes li { +._moin_footnotes li { } .info {
The modify the FootNote macro:
--- FootNote.py.original 2008-01-22 22:27:10.000000000 +0100 +++ FootNote.py 2008-01-22 22:27:31.000000000 +0100 @@ -66,7 +66,7 @@ if request.footnotes: result = [] - result.append(formatter.div(1, css_class='footnotes')) + result.append(formatter.div(1, css_class='moin_footnotes')) # Add footnotes list result.append(formatter.number_list(1))
Discussion
Thanks for the bug report and the patch.
The problem with this patch is that it would break all moin themes out there and affect many more users (compared to the amount of users affected by the docbook problem). Some theme authors are rather slowly (or never) updating their themes.
So can this be fixed in a different way?
- A heavier solution, but that would offer some backward compatibility would be to do the following:
- Update all current official theme to add "moin_" to all the CSS classes names.
Add a new configuration variable, maybe named theme_compatibility_mode, that will have to be set to true to use the old themes.
Update the MoinMoin code to add the "moin_" prefix to the generated CSS classes names if this variable is False or not set.
The sites using old themes will just need to set the theme_compatibility_mode and will be able to continue using their old themes. However, this solution will not work for sites using both an updated theme and an old theme. -- JeanPhilippeGuérard 2008-03-07 22:41:36
Plan
- Priority:
- Assigned to:
- Status: