Description
Not sure if this is a bug or working as intended, but 1.9 passes actions an empty dict as request.form. Prior to 1.9, request.form contained the query string key-value pairs. This impacted Nir Soffers Themes macro (the action part of it) - fixed as of today. At least one other contributed action, PDFControl, uses request.form to inspect passed query strings.
Steps to reproduce
Use logging to display value of request.form within an action that expects a query string.
Example
N/A
Component selection
- general
Details
MoinMoin Version |
1.9.0beta4 |
OS and Version |
windows 7 RC |
Python Version |
2.5.4 |
Server Setup |
apache |
Server Details |
wsgi |
Language you are using the wiki in (set in the browser/UserPreferences) |
en |
Discussion
see MoinMoinTodo/Release 1.9/FormReview
This change has broken invocation of actions via links: even if the special form_trigger name (such as "doit", defined in ActionBase) is set in the URL query parameters, the action will never be invoked since ActionBase will only inspect the "strict" form parameters, not the combination of such parameters and query parameters, as happened before. I suggest changing ActionBase to use request.values - even though all request API usage has to be reviewed for 1.9 (which is really unfortunate), at least the do_action method will be invoked. -- PaulBoddie 2010-06-09 23:26:00
Thanks for the change, Thomas! It seems to do the trick. -- PaulBoddie 2010-06-26 15:21:24
It occurs to me that macros should have a similar change implemented. Currently, I'm using request.form in various places, and I could use macro.form if it were still supported, I think. (I didn't notice that it existed until looking into this problem.) -- PaulBoddie 2010-07-07 23:28:20
Plan
- Priority:
Assigned to: ThomasWaldmann
Status: improved moin 1.8 compatibility by default, see http://hg.moinmo.in/moin/1.9/rev/cd113b42bc5d (if you want stricter behaviour, see the new use_form parameter)