New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`redirect()` does not accept a struct for the `queryString` argument #383

Closed
U47 opened this Issue Oct 16, 2015 · 7 comments

Comments

Projects
None yet
2 participants
@U47

U47 commented Oct 16, 2015

A struct is permitted for queryString in the BuildURL() method, yet not in the redirect() method. Seems like an easy fix for consistency.

BuildURL(action = 'sprocket.edit', queryString = {'id' = someVar, 'parent' = someOtherVar});

works, but

redirect(action = 'sprocket.edit', queryString = {'id' = someVar, 'parent' = someOtherVar});

doesn't.

My 2¢.

@seancorfield

This comment has been minimized.

Show comment
Hide comment
@seancorfield

seancorfield Oct 16, 2015

Member

That does seem like a good idea and it looks fairly easy to add (I can just copy the queryString struct-to-string code from buildURL() into redirect() -- or rather make it a helper function and call it in both places!).

Member

seancorfield commented Oct 16, 2015

That does seem like a good idea and it looks fairly easy to add (I can just copy the queryString struct-to-string code from buildURL() into redirect() -- or rather make it a helper function and call it in both places!).

@seancorfield seancorfield self-assigned this Oct 16, 2015

@seancorfield seancorfield added this to the 3.5 milestone Oct 16, 2015

@U47

This comment has been minimized.

Show comment
Hide comment
@U47

U47 Oct 16, 2015

For sure. As a workaround, I'm just calling BuildURL with an empty string as the path and feeding that into redirect().

Not a huge deal.

U47 commented Oct 16, 2015

For sure. As a workaround, I'm just calling BuildURL with an empty string as the path and feeding that into redirect().

Not a huge deal.

@seancorfield

This comment has been minimized.

Show comment
Hide comment
@seancorfield

seancorfield Oct 16, 2015

Member

Added to develop branch. This will be in FW/1 3.5. 👍

Member

seancorfield commented Oct 16, 2015

Added to develop branch. This will be in FW/1 3.5. 👍

@seancorfield

This comment has been minimized.

Show comment
Hide comment
@seancorfield

seancorfield Oct 16, 2015

Member

Documentation updated (Reference Manual for 3.5).

Member

seancorfield commented Oct 16, 2015

Documentation updated (Reference Manual for 3.5).

@U47

This comment has been minimized.

Show comment
Hide comment
@U47

U47 Jan 25, 2017

Hi @seancorfield. Did this regress in v4.0?

Error: The QUERYSTRING argument passed to the redirect function is not of type string.

With code:

framework.redirect(action= 'app.edit', queryString= {id= rc.app.id});

U47 commented Jan 25, 2017

Hi @seancorfield. Did this regress in v4.0?

Error: The QUERYSTRING argument passed to the redirect function is not of type string.

With code:

framework.redirect(action= 'app.edit', queryString= {id= rc.app.id});
@seancorfield

This comment has been minimized.

Show comment
Hide comment
@seancorfield

seancorfield Jan 25, 2017

Member

Looks like it was never fixed properly: https://github.com/framework-one/fw1/blob/develop/framework/one.cfc#L1065 -- still has string as the data type of the argument, even tho' the code inside the function accepts a struct. Reopening.

Member

seancorfield commented Jan 25, 2017

Looks like it was never fixed properly: https://github.com/framework-one/fw1/blob/develop/framework/one.cfc#L1065 -- still has string as the data type of the argument, even tho' the code inside the function accepts a struct. Reopening.

@seancorfield

This comment has been minimized.

Show comment
Hide comment
@seancorfield

seancorfield Jan 25, 2017

Member

This commit should solve it 3f3db94 and it'll be in 4.1.

Member

seancorfield commented Jan 25, 2017

This commit should solve it 3f3db94 and it'll be in 4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment