#1291: Routing fails to refill all parameters when same parameter name used in
consecutive route elements
------------------------------------+---------------------------------------
Reporter: nik_makepe...@… | Owner: dominik
Type: defect | Status: new
Priority: normal | Milestone: 1.0.4
Component: routing | Version: 1.0.3
Severity: normal | Keywords: routing
refill_all_parameters surprising-behaviour documentation-missing
Has_patch: 0 |
------------------------------------+---------------------------------------
Using the following routes, a call to routing->gen() from a view in the
second route fails to generate the route conf.admin.registrations.view* -
the conference_name and registration_id parameters are not filled. This
means that from this page
conference/myconf/registered/4 (matches conf.view.registered) generating a
conf.admin.registrations.view* route results in
/conference//admin/registrations/ - both conference_name and
registration_id are missing. This may well be by design, but it is
surprising.
{{{
<route name="conf" pattern="^/conference" module="Conference">
<route name=".admin"
pattern="^/(conference_name:[a-zA-Z_\-0-9]+)/admin">
<route name=".registrations" pattern="^/registrations"
action="ListRegistrations">
<route name=".view"
pattern="^/(registration_id:\d+)" action="ViewRegistration"/>
</route>
</route>
<route name=".view" pattern="^/(conference_name:[a-zA-Z_\-0-9]+)">
<route name=".registered"
pattern="^/registered/(registration_id:\d+)$" action="Registered"
method="read"/>
</route>
</route>
}}}
In Conference_RegisteredSuccessView::executeHtml()
{{{
$this->setAttribute('view_registration_link',
$this->getContext()->getRouting()->gen('conf.admin.registrations.view*'));
}}}
--
Ticket URL: <http://trac.agavi.org/ticket/1291>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets