Loading...

cfwheels@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[cfwheels] Re: periods in variables causing incorrect SQL raulriera Thu Nov 25 07:00:10 2010

Although I am in favor of provides handling the .[format] on it's
own.. this is a bug.. because it's not actually doing that AND keeping
your code for working... already filled an issue about this..

On Nov 25, 1:00 pm, Neokoenig <[EMAIL PROTECTED]> wrote:
> So any further thoughts - is this a bug?
> Presumably this breaks standard URL conventions (are there any!?).
>
> Personally I'd like to implicitly specify [format] in routes, rather
> than wheels assuming a '.' implies [format]
> (if that makes any sense?)
> T
>
> On Nov 24, 2:23 pm, raulriera <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yes but that is not working in Wheels either... why would I need that
> > for custom routes? I would like that code I pasted out of addRoute and
> > into whatever handles every request. Because currently without doing
> > custom routes like Chris mentioned above doing [action].xml won\t work
>
> > // without custom routes it doesnt work
> > users/show/1.json
>
> > // with custom routes it works, but in this case I would be doing
> > users/[action]/[key].[format] myself
> > users/show/1.json
>
> > On Nov 24, 11:22 am, Neokoenig <[EMAIL PROTECTED]> wrote:
>
> > > Ah - so the [format] bit in the routes means I can no longer have '.'
> > > in a URL string..?
> > > Is this a 1.1 change then..?
>
> > > On Nov 24, 10:02 am, raulriera <[EMAIL PROTECTED]> wrote:
>
> > > > if (Find(".", loc.thisRoute.pattern))
> > > >                 {
> > > >                         loc.thisRoute.format = 
> > > > ListLast(loc.thisRoute.pattern, ".");
> > > >                         loc.thisRoute.formatVariable = 
> > > > ReplaceList(loc.thisRoute.format,
> > > > "[,]", "");
> > > >                         loc.thisRoute.pattern = 
> > > > ListFirst(loc.thisRoute.pattern, ".");
> > > >                 }
>
> > > > That may be causing your problem...
>
> > > > On Nov 24, 10:56 am, Neokoenig <[EMAIL PROTECTED]> wrote:
>
> > > > > Ok, steps to replicate;
>
> > > > > Add the following test route:
>
> > > > > <cfset addRoute(name="test", pattern="users/[username]",
> > > > > controller="test", action="test")>
>
> > > > > Create a view file of /test/test.cfm and dump the params struct
>
> > > > > Try:http://localhost/index.cfm/users/foo
> > > > >  - works fine,
>
> > > > > Tryhttp://localhost/index.cfm/users/foo.bar
> > > > > - you'll see the .bar is stripped from the params.username variable.
>
> > > > > T

-- 
You received this message because you are subscribed to the Google Groups 
"ColdFusion on Wheels" 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/cfwheels?hl=en.