21489 Posts in 5783 Topics by 2622 members
General Questions
SilverStripe Forums » General Questions » Search: Missing argument 2 for Page_Controller::results
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 932 Views |
-
Search: Missing argument 2 for Page_Controller::results

6 June 2010 at 12:17pm
All of a sudden, one of my search systems (SS 2.3.1) has started doing this. Nothing has changed on the site for literally months. I have found one post in these forums from 2 years ago with the exact same problem, however noone responded to the guy.
Full error:
[Warning] Missing argument 2 for Page_Controller::results(), called in /home/zanzomedia/site/sapphire/core/control/Controller.php on line 162 and defined
GET /home/results?formController=home%2F&executeForm=SearchForm&Search=test&action_results.x=16&action_results.y=7&action_results=GoLine 126 in /home/zanzomedia/site/mysite/code/Page.php
Source117 );
118
119 $actions = new FieldSet(
120 new FormAction('results', 'Search')
121 );
122
123 return new SearchForm($this, "SearchForm", $fields, $actions);
124 }
125
126 function results($data, $form){
127 $data = array(
128 'Results' => $form->getResults(),
129 'Query' => $form->getSearchQuery(),
130 'Title' => 'Viva Expeditions Search Results'
131 );
132Trace
* Page_Controller->results(HTTPRequest)
Line 162 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 107 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 28 of ModelAsController.php
* ModelAsController->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(home/results)
Line 115 of main.phpAny ideas what this error pertains to and why it would appear for no reason? The code is straight out of the tutorial, although the form is hardcoded.
-
Re: Search: Missing argument 2 for Page_Controller::results

4 August 2010 at 6:37am
Any thoughts on this? I'm having the same problem as well.
| 932 Views | ||
|
Page:
1
|
Go to Top |


