Description

Using the standalone web server, I want to add a moin parser

The solution I discovered (after much annoyance) was to make sure that the .py file had already been compiled into a pyc file (I did this by importing MoinMoin.parser.TEST froma command line python shell).

This may only occur with the standalone server (I haven't tested any others, but I seem to remember similar problems in the past; possibly under Apache: in particular, never being able to put my parser into the wiki-instance, possibly for this exact same reason).

Steps to reproduce

  1. copy CSV.py to TEST.py in the site-packages/MoinMoin/parser directory
  2. call both the CSV and TEST parsers

TEST won't work.

re-load the wiki-page and TEST will now work.

Example

see above description.

Component selection

Details

MoinMoin Version

1.5.8

OS and Version

Fedora COre 6

Python Version

2.5

Server Setup

standalone server

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

english

Workaround

import the module to create a pyc.

Discussion

Reporter - try this:

  1. Copy new parser module to your wiki/data/plugin/parser/ directory
  2. Restart standalone server
  3. Edit a page and add a new parser invocation e.g.

    { { {#!foo
    Text parsed by parser named foo.
    } } }
  4. The new parser should work

Note: If you added the parser invocation before the parser was installed, the page is cached using plain text parser, and the new parser will not loaded until the page cache is deleted. To force the page to render and look for the parser, delete the page cache (More Actions > Delete Cache). (see moin maint cleancache for removing all cache files from all pages)

If the problem is different, provide the steps to reproduce it like the steps above.

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/NewParsersDontWorkUnlessPrecompiled (last edited 2007-10-29 19:08:13 by localhost)