Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
221
Merge Requests
221
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
a48aa76c
Commit
a48aa76c
authored
Dec 29, 2014
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2370313
by olli: D8 - Exposed filter - "This webpage has a redirect loop" on Reset
parent
118abbcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php
...s/src/Plugin/views/exposed_form/ExposedFormPluginBase.php
+3
-0
core/modules/views/src/Tests/Plugin/ExposedFormTest.php
core/modules/views/src/Tests/Plugin/ExposedFormTest.php
+5
-0
No files found.
core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php
View file @
a48aa76c
...
...
@@ -327,6 +327,9 @@ public function resetForm(&$form, FormStateInterface $form_state) {
$form_state
->
setRebuild
();
$this
->
view
->
exposed_data
=
array
();
}
$form_state
->
setRedirect
(
'<current>'
);
$form_state
->
setValues
([]);
}
}
...
...
core/modules/views/src/Tests/Plugin/ExposedFormTest.php
View file @
a48aa76c
...
...
@@ -101,6 +101,11 @@ public function testResetButton() {
// Test the button is hidden after reset.
$this
->
assertNoField
(
'edit-reset'
);
// Test the reset works with type set.
$this
->
drupalGet
(
'test_exposed_form_buttons'
,
array
(
'query'
=>
array
(
'type'
=>
'article'
,
'op'
=>
'Reset'
)));
$this
->
assertResponse
(
200
);
$this
->
assertFieldById
(
'edit-type'
,
'All'
,
'Article type filter has been reset.'
);
// Rename the label of the reset button.
$view
=
Views
::
getView
(
'test_exposed_form_buttons'
);
$view
->
setDisplay
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment