Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Jun 2013 at 23:42 UTC
Updated:
23 Apr 2019 at 10:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
spadxiii commentedI just ran into this issue myself and found a solution:
First part of the problem is that in the ajax_views.js `attachExposedFormAjax` only the first button gets ajax-ed. I changed this so that all buttons are ajax-ed.
Second part is that upon reset, the form redirects. This means you get a '303 See Other'-response, because in the `resetForm` method of `ExposedFormPluginBase` it's only checking if this is a live-preview. Here it should also check if it's a xmlHttpRequest (ajax) and keep the form_state-redirecting disabled if it is.
I think this also needs tests, but I don't have an idea how to create a test for this. :)
Comment #2
jhedstromPatch no longer applies.
Comment #3
olli commentedReroll.
Comment #4
prashantgoel commentedThis patch looks good to me. It solves the issue described.
Comment #5
jhedstromI've manually tested without the patch, and with the patch, and can confirm the bug, and that the patch resolves the issue.
I've added a beta phase evaluation to the summary.
Comment #6
olli commentedFixed eslint error
Comment #7
alexpottCommitted 4988a81 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to issue summary.
Comment #10
jagermonster commentedThe reset button still does not seem to function correctly when the view is rendered in a modal and has ajax enabled
It looks like this was not merged correctly and is conflicting with https://www.drupal.org/comment/reply/2732111
This patch https://www.drupal.org/files/issues/2732111-30.patch removes the bind from the reset button
$('input[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) {I think this line should be changed to the following:
$('input[type=submit], input[type=image]', this.$exposed_form).each(function (index) {