Skip to content
This repository
Browse code

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

…xes #7408)
  • Loading branch information...
commit 8b8de0564ccbc0698ab6bf012d9947722e08eaa4 1 parent 63467b0
Ingo Schommer authored June 05, 2012

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  code/controllers/AssetAdmin.php
7  code/controllers/AssetAdmin.php
@@ -91,6 +91,13 @@ public function getList() {
91 91
 		$params = $this->request->requestVar('q');
92 92
 		$list = $context->getResults($params);
93 93
 
  94
+		// Don't filter list when a detail view is requested,
  95
+		// to avoid edge cases where the filtered list wouldn't contain the requested
  96
+		// record due to faulty session state (current folder not always encoded in URL, see #7408).
  97
+		if($this->request->param('ID') == 'field') {
  98
+			return $list;
  99
+		}
  100
+
94 101
 		// Re-add previously removed "Name" filter as combined filter
95 102
 		// TODO Replace with composite SearchFilter once that API exists
96 103
 		if(isset($params['Name'])) {

2 notes on commit 8b8de05

Andrew O'Neil

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

Ingo Schommer
Owner

@ajoneil Wanna file a new bug for it?

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