Skip Menu |
 

This queue is for tickets about the Catalyst-Plugin-Params-Nested CPAN distribution.

Report information
The Basics
Id: 59604
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-Params-Nested

People
Owner: bobtfish [...] bobtfish.net
Requestors: perl [...] evancarroll.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Empty brackets needlessly duplicates params. (False trigger)
Download (untitled) / with headers
text/plain 668b
Background: jQuery UI uses brackets as a preferred means for serialization, so if you have a series of elements in a widget: id="foo_4", id="foo_6", etc. and you request the widget to serialize you'll have foo[]=4&foo[]=6 which can then be append on the URL.. This is simply the default. C:P:P:N will false triggers here though and it will modify $c->req->params with by adding a 'foo'. Now, $c->req->params will have 'foo[]', AND 'foo'. Both, set with an array ref to [4,6]. I would suggest you not have C:P:P:N trigger if the bracket is empty '[]', and let the default action do its thing. -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
Subject: Re: [rt.cpan.org #59604] Empty brackets needlessly duplicates params. (False trigger)
Date: Wed, 21 Jul 2010 18:27:38 -0500
To: bug-Catalyst-Plugin-Params-Nested [...] rt.cpan.org
From: Jonathan Rockway <jon [...] jrock.us>
Download (untitled) / with headers
text/plain 1.2k
Patch? Test case? "Evan Carroll via RT" <bug-Catalyst-Plugin-Params-Nested@rt.cpan.org> wrote: Show quoted text
>Wed Jul 21 16:11:41 2010: Request 59604 was acted upon. >Transaction: Ticket created by ECARROLL > Queue: Catalyst-Plugin-Params-Nested > Subject: Empty brackets needlessly duplicates params. (False trigger) > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: perl@evancarroll.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=59604 > > > >Background: jQuery UI uses brackets as a preferred means for >serialization, so if you have a series of elements in a widget: >id="foo_4", id="foo_6", etc. and you request the widget to serialize >you'll have foo[]=4&foo[]=6 which can then be append on the URL.. This >is simply the default. > >C:P:P:N will false triggers here though and it will modify >$c->req->params with by adding a 'foo'. Now, $c->req->params will have >'foo[]', AND 'foo'. Both, set with an array ref to [4,6]. > >I would suggest you not have C:P:P:N trigger if the bracket is empty >'[]', and let the default action do its thing. > >-- >Evan Carroll >System Lord of the Internets >http://www.evancarroll.com
-- Sent from my Android phone with K-9 Mail. Please excuse my brevity.
RT-Send-CC: jon [...] jrock.us
Download (untitled) / with headers
text/plain 525b
On Wed Jul 21 18:27:37 2010, jon@jrock.us wrote: Show quoted text
> Patch? Test case?
Patch w/ test case, pls. review. Github fork http://github.com/EvanCarroll/Catalyst-Plugin-Params-Nested/tree/ Github patch html http://github.com/EvanCarroll/Catalyst-Plugin-Params- Nested/compare/05b82db529a01780d12c...8e9152d85d3340e2dee8 Github patch raw http://github.com/EvanCarroll/Catalyst-Plugin-Params- Nested/compare/05b82db529a01780d12c...8e9152d85d3340e2dee8.patch -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
Released as 0.04, thanks for the patch!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.