Query parameter ?action=somevalue will get 404 error #3652

Closed
atans opened this Issue Feb 2, 2013 · 4 comments

Projects

None yet

4 participants

@atans
Contributor
atans commented Feb 2, 2013

module.config.php

array(
    'routes' => array(
        'application' => array(
            'type' => 'segment',
            'options' => array(
                'route' => '/application[/]',
                'defaults' => array(
                    'controller' => ...
                ),
            ),
            'may_terminate' => true,
            'child_routes' => array(
                'query' => array(
                    'type' => 'query',
                ),
            ),
        ),
    ),
);

Get this error when visit /application/?action=something

A 404 error occurred
Page not found.

The requested controller was unable to dispatch the request.

Controller:
    Account\Controller\Index

No Exception available
@samsonasik
Contributor

You should define what route Query is like the following :

                      'query' => array(
                                'type' => 'Query',
                                'options' => array(
                                    'route' => '?[:keyword]&[:category]&[:is_mine]'
                                ),
                            ),
@weierophinney
Member

Well, you shouldn't need a query route most of the time. I'd consider this
a bug.

On Sunday, February 3, 2013, Abdul Malik Ikhsan wrote:

You should define what route Query is like the following :

                  'query' => array(
                            'type' => 'Query',
                            'options' => array(
                                'route' => '?[:keyword]&[:category]&[:is_mine]'
                            ),
                        ),


Reply to this email directly or view it on GitHubhttps://github.com/zendframework/zf2/issues/3652#issuecomment-13043574.

Matthew Weier O'Phinney
matthew@weierophinney.net
http://mwop.net/

@atans
Contributor
atans commented Feb 4, 2013

@weierophinney
Yes, weierophinney.
In this problem, I should change action=something to otherKey=something to fix it.

@weierophinney
Member

#3778 Should address this.

@ralphschindler ralphschindler added a commit that closed this issue Feb 19, 2013
@ralphschindler ralphschindler Closes #3778
Also closes #3711
Also closes #3652
Also closes #3636

Merge branch 'weierophinney-hotfix/3711'
a3df97c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment