Description
When adding a link via GUI-Editor the value of request.cfg.interwiki_preferred is modified. This caused trouble in the development of the theme sinorca4moin (server hangs and needed restart). With the new version of the theme the bug does not show up anymore. It should be fixed anyhow.
Steps to reproduce
- Add link to page with GUI-Editor
- Click either "preview" or "save"
=> Import error. Cannot import AbbeNormal (That wiki name gets inserted from intermap.txt).
This happened because the theme uses request.cfg.interwiki_preferred and assumed that this list contains only wikis of the wikifarm. Accordingly it was tried to import AbbeNormal just like all other subwiki-configs in the farm.
Details
MoinMoin Version |
moin-1.5.4 & version-0.4 of sinorca4moin |
OS and Version |
WinXP |
Python Version |
2.4.3 |
Server Setup |
Apache 2.0.53/modpython3.2.10 or DesktopEdition |
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
If it is of interest I can provide the old version 0.4 of sinorca4moin. -- DavidLinke
Workaround
I think it is an obvious bug: A reference to a list is created instead of making a copy. Than the original list gets modified although this is not intended. A patch (rev.64 == moin-1.5.4):
{{{Index: C:/Sources/moin-aca-trunk/MoinMoin/action/fckdialog.py =================================================================== --- C:/Sources/moin-aca-trunk/MoinMoin/action/fckdialog.py (revision 64) +++ C:/Sources/moin-aca-trunk/MoinMoin/action/fckdialog.py (working copy) @@ -233,7 +233,7 @@
wikiutil.resolve_wiki(request, "FrontPage") interwiki = request.cfg._interwiki_list.keys() interwiki.sort()
- iwpreferred = request.cfg.interwiki_preferred + iwpreferred = request.cfg.interwiki_preferred[:] # make a copy of list!
- if not iwpreferred or iwpreferred and iwpreferred[-1] != None:
- resultlist = iwpreferred for iw in interwiki:}}}
Discussion
Plan
- Priority:
- Assigned to:
- Status: Fixed in 1.5 and 1.6 branch