Can you test if this is still true on 2.2 Beta? 2.2 switched to a new dispatch system (Crank) and it would be great to know if the issue is still there in Crank.
On Sun, Apr 22, 2012 at 12:11 PM, ozwyzard <[email protected]> wrote: > Configuration: Turbogears 2.1.5 CrudRestController, using _before() > calls in the nested controllers. > > Issue: 'new' and 'delete' operations on last node of a set of nested > controllers land on the wrong nested controller > > Scenario: > /controller1/arg1/controller2/controller3/new ends up calling / > controller1/arg1/controller2/new > controller1, controller2, controller3 all implement _before() > > Untested: I've not tested the same for the 'edit' operation (since my > controllers do not implement the edit functionality for the particular > set of controllers in question). > > Workaround: Seems to work if > restcontroller.py::RestDispatcher:_check_for_sub_controllers() is > modified to always execute the 'if var_args:' condition (e.g. changing > it to 'if 1:'). > > Alternative Workaround: Modify > restcontroller.py::RestDispatcher:_handle_get() to call > _handle_delete_edit_or_new() and _handle_custom_get() after the call > to self._is_controller(). With this fix, the 'new' (i.e. http get new > form) works, but the delete function would still not work. > > Summary: The http method is tried against the first available item in > the remainder list, instead of being called against the last > controller in the remainder list. > > -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en. > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

