When attempting to sort the search results table in ModelAdmin I get an undefined index error. Here's the whole thing:
ERROR
[Notice] Undefined index: ResultAssembly
GET /wag/admin/library/Sector/ResultsForm/field/Sector?Name=&%3BResultAssembly%5BName%5D=Name&ctf%5BSector%5D%5Bsort%5D=Name
Line 672 in C:\xampp\htdocs\wag\cms\code\ModelAdmin.php
Source
663 *
664 * @param array $searchCriteria Limit fields by populating the 'ResultsAssembly' key
665 * @param boolean $selectedOnly Limit by 'ResultsAssempty
666 */
667 function getResultColumns($searchCriteria, $selectedOnly = true) {
668 $model = singleton($this->modelClass);
669
670 $summaryFields = $this->columnsAvailable();
671
672 $resultAssembly = $searchCriteria['ResultAssembly'];
673 if($selectedOnly && $resultAssembly) {
674
675 if(!is_array($resultAssembly)) {
676 $explodedAssembly = split(' *, *', $resultAssembly);
677 $resultAssembly = array();
678 foreach($explodedAssembly as $item) $resultAssembly[$item] = true;
Trace
ModelAdmin_CollectionController->getResultColumns(Array)
Line 697 of ModelAdmin.php
ModelAdmin_CollectionController->getResultsTable(Array)
Line 733 of ModelAdmin.php
ModelAdmin_CollectionController->ResultsForm(SS_HTTPRequest)
Line 193 of Controller.php
Controller->handleAction(SS_HTTPRequest)
Line 354 of ModelAdmin.php
ModelAdmin_CollectionController->handleActionOrID(SS_HTTPRequest)
Line 134 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest)
Line 152 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest)
Line 283 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 127 of Director.php
Director::direct(/admin/library/Sector/ResultsForm/field/Sector)
Line 127 of main.php
I've stripped my ModelAdmin right down to the management of a single basic extended DataObject and emptied all custom tables from the database just to eliminate all errors I might have caused, I've even tried switching between beta-2 and rc-1 but it hasn't changed anything.
What is this ResultAssembly that for some reason doesn't seem to exist? Is anyone else getting this error? How can it be fixed?