From 8b8de0564ccbc0698ab6bf012d9947722e08eaa4 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 5 Jun 2012 13:42:38 +0200 Subject: [PATCH] BUGFIX Don't filter AssetAdmin list view when showing detail view (fixes #7408) --- code/controllers/AssetAdmin.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index 94ed93b5..02f12150 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -91,6 +91,13 @@ JS $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'])) {