Description

Using a plugin formatter causes much of the page header from the theme to be lost. I think this has to do with a less than clean division between the concept of theme from the concept of formatter. In moin-1.5.6, Page.py line 1166 in send_page:

   1             # send the page header
   2             if self.default_formatter:    #<---LINE 1166
   3                 full_text_query = 'linkto:"%s"' % self.page_name
   4                 link = '%s/%s?action=fullsearch&amp;value=%s&amp;context=180' % (
   5                     request.getScriptname(),
   6                     wikiutil.quoteWikinameURL(self.page_name),
   7                     wikiutil.url_quote_plus(full_text_query))

If a formatter plugin is used, default_formatter is False. This causes wikiutil.send_title(request,... at line 1201 to be skipped (as part of the 'if' statment. I thought formatters would only affect the rendering of the content of the wiki (as called from the parser) and should not affect the outside of 'theme' of the page.

Steps to reproduce

Component selection

Details

MoinMoin Version 1.5.6

OS and Version

Python Version

Server Setup standalone

Server Details

Language you are using the wiki in EN

Workaround

Copy the relevant code from the if block at line 1166 in Page.py into the startDocument part of you formatter (evil)

Discussion

You are right, this stuff is a mess in 1.5.

The confusion there comes from trying to do 2 things from 1 value:

1.5 tries to do both at once (#format wiki means: input is text/x-moin-wiki, output is text/html, #format plain means: input is text/plain, output is text/plain).

Plan


CategoryMoinMoinBug CategoryForMoin2

MoinMoin: MoinMoinBugs/ThemeFormatterWrongForNonWikiFormats (last edited 2010-01-12 14:06:52 by PascalVolk)