Description

1.9 revision 554e1d780e3b has changed MoinMoin.user in a way that trail_size = n actually produces n - 1 entries in the page trail. This happens because in 1.8, trail = trail[-(trail_size - 1):] was done before appending the current page, but in 1.9 that's done after. Hence we need to remove the - 1 part because we need to include the current page in that count.

Steps to reproduce

Use trail_size = n and check that you actually get n - 1 items in the page trail.

Patch

   1 --- MoinMoin/user.py    2010-02-15 18:12:01 +0000
   2 +++ MoinMoin/user.py    2010-02-16 03:20:11 +0000
   3 @@ -900,7 +900,7 @@
   4              pagename_stripped = pagename.strip()
   5              if pagename_stripped:
   6                  trail.append(pagename_stripped)
   7 -            self._request.session['trail'] = trail[-(self._cfg.trail_size-1):]
   8 +            self._request.session['trail'] = trail[-(self._cfg.trail_size):]
   9  
  10      def getTrail(self):
  11          """ Return list of recently visited pages.

Workaround

trail_size = (n + 1).

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.9_WrongPagetrailSize (last edited 2010-02-16 21:23:23 by ThomasWaldmann)