Skip to content
Browse files

BUGFIX Don't filter AssetAdmin list view when showing detail view (fi…

…xes #7408)
  • Loading branch information...
1 parent 63467b0 commit 8b8de0564ccbc0698ab6bf012d9947722e08eaa4 @chillu chillu committed Jun 5, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 code/controllers/AssetAdmin.php
7 code/controllers/AssetAdmin.php
@@ -91,6 +91,13 @@ public function getList() {
$params = $this->request->requestVar('q');
$list = $context->getResults($params);
+ // Don't filter list when a detail view is requested,
+ // to avoid edge cases where the filtered list wouldn't contain the requested
+ // record due to faulty session state (current folder not always encoded in URL, see #7408).
+ if($this->request->param('ID') == 'field') {
+ return $list;
+ }
// Re-add previously removed "Name" filter as combined filter
// TODO Replace with composite SearchFilter once that API exists
if(isset($params['Name'])) {

2 comments on commit 8b8de05

ajoneil commented on 8b8de05 Sep 3, 2012

This breaks pagination in AssetAdmin - the gridfield will lose the context of which folder it is in and show files from all folders.

SilverStripe Ltd. member
chillu commented on 8b8de05 Sep 3, 2012

@ajoneil Wanna file a new bug for it?

Please sign in to comment.
Something went wrong with that request. Please try again.