Description
When the base page title of MonthCalendar includes spaces, the navigation buttons produce an error:
Invalid MonthCalendar calparms "test page,2008,5,0,1,"!
Steps to reproduce
- Create a page with spaces in its name eg "Test Page"
- Insert the macro
<<MonthCalendar>>
- into the page and save it
<< < 2025 / 4 > >> | ||||||
---|---|---|---|---|---|---|
Mon | Tue | Wed | Thu | Fri | Sat | Sun |
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- Hit the one of the forward or backwards buttons
Example
Component selection
- general
Details
MoinMoin Version |
1.6.1 .. 1.6.3 |
OS and Version |
Windows server 2003 |
Python Version |
2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] |
Server Setup |
Apache/2.2.6 (Win32) mod_python/3.3.1 Python/2.5.1 mod_auth_sspi/1.0.4 PHP/5.2.5 |
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
en |
Workaround
Try this:
diff -r 0202763f382f MoinMoin/macro/MonthCalendar.py --- a/MoinMoin/macro/MonthCalendar.py Tue May 20 02:57:44 2008 +0200 +++ b/MoinMoin/macro/MonthCalendar.py Tue May 20 11:11:30 2008 +0200 @@ -218,7 +218,7 @@ def parseargs(args, defpagename, defyear return parmpagename, parmyear, parmmonth, parmoffset, parmoffset2, parmheight6, parmanniversary, parmtemplate # FIXME: vvvvvv is there a better way for matching a pagename ? -_arg_basepage = r'\s*(?P<basepage>[^, ]+)?\s*' +_arg_basepage = r'\s*(?P<basepage>[^,]+)?' _arg_year = r',\s*(?P<year>\d+)?\s*' _arg_month = r',\s*(?P<month>\d+)?\s*' _arg_offset = r',\s*(?P<offset>[+-]?\d+)?\s*'
Discussion
Many thanks. Tried and worked. My version of the code was slightly different:
-_arg_basepage = r'\s*(?P<basepage>[^, ]+)?\s*' +_arg_basepage = r'\s*(?P<basepage>[^,]+)?'
2008-05-21 23:24:18
I don't see a difference to the patch above. -- ThomasWaldmann 2008-05-22 12:28:46
Plan
- Priority:
- Assigned to:
Status: fixed by http://hg.moinmo.in/moin/1.6/rev/3fc165a8bfcc (and works in 1.7 without that patch)