rightsidebar theme has problems with UserPreferences link

1. Non-root wiki breaks logout button

The below from rightsidebar.py assumes that you have your wiki pages mapped to the top level of your virtual host.

html.append('<form action="/UserPreferences" method="POST">')

2. Non-root wiki breaks user name display for logged-in user

With the below line, the text for link to user preferences is always "UserPreferences", even if the user is logged in

            html.append('%s' % wikiutil.link_tag(self.request, wikiutil.quoteWikiname(d['page_user_prefs'])))

3. Python import statement

The rightsidebar theme inherits from classic, but the import statement assumes classic.py is in the same folder, so it is that much harder to create a new theme (in data/plugins/theme) based on rightsidebar theme.

from classic import Theme as ThemeBase

Example

Here's an example using someone else's wiki (please don't abuse account, and maybe kill account when fix is in):

1. Goto http://www.solasi.org/moin.cgi

2. Log in as TestUser (password testuser)

login is at bottom of page, under PythonPowered, or go to http://www.solasi.org/moin.cgi/UserPreferences

3. Change to rightsidebar theme

4. Test the bugs

  1. Confirm that clicking logoff button has no effect
  2. Confirm that text is UserPreferences rather than username (TestUser)

  3. Can't confirm this from here - you'll have to trust me!

Details

This Wiki (but not with the current setup - requires non-root wiki)

Discussion

I moved this from the unsorted section on the MoinMoinBugs page (bug 1), so sorry there isn't a lot of supporting examples. I'll search through the MoinMoinWikis for a suitable example (my site is intranet only)

Here are my fixes:

1. Non-root wiki breaks logout button This fix (one byte change) worked for me:

html.append('<form action="UserPreferences" method="POST">')

2. Non-root wiki breaks user name display for logged-in user Use the code fragment from classic:

            html.append ('%s' % wikiutil.link_tag(
                self.request, wikiutil.quoteWikiname(d['page_user_prefs']),
                wikiutil.escape(d['user_prefs'])))

3. Python import statement Fully qualify the import statement:

from MoinMoin.theme.classic import Theme as ThemeBase

Please try moin 1.2.3! It should be fixed there.

Plan


CategoryMoinMoinBugFixed

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