Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to replicate:
- On the uc_order views config, enable Use AJAX.
- Go to order page provided by view and enter an order number, then Apply.
Expected behavior is to redirect on order page but, in fact, a modal window is displayed and complains that AJAX encountered an error and the error message is in fact the order page.
Solutions: Use ctools_ajax_command_redirect on views that use AJAX.
Comment | File | Size | Author |
---|---|---|---|
#1 | Issue-2529854-1-Redirect-to-order-page-even-when-AJAX-is-enabled-in-.patch | 1.6 KB | SilviuChingaru |
Comments
Comment #1
SilviuChingaru CreditAttribution: SilviuChingaru commentedComment #2
TR CreditAttribution: TR commentedIsn't that a known limitation of using the Views Ajax setting?
(emphasis added)
So Views is recommending not to turn on that setting for this page.
It seems to me that the first hunk in your patch could be put in views_exposed_form() instead of our form_alter, while the second hunk could be put in views_exposed_form_submit() instead of our add-on submit function. Then it would solve the problem for *all* forms trying to use the Ajax setting under these conditions? Or does the code in your patch interfere with some normal Views operations when Ajax is off, and that's why the patch code isn't in there to begin with?
Comment #3
SilviuChingaru CreditAttribution: SilviuChingaru commentedI opened an issue about this and posted a patch also on Views Issue list: #2531708: Views exposed form redirect on $form_state['redirect'] not working when using AJAX
Comment #4
siva_drupal CreditAttribution: siva_drupal as a volunteer commentedI tested the above issue, the issue is reproducible and also the patch#1 also working fine for that issue.
Comment #5
TR CreditAttribution: TR commented@siva_drupal: If you could test out and comment on #2531708: Views exposed form redirect on $form_state['redirect'] not working when using AJAX (mentioned in #3) that would help, because this really should be fixed in Views if possible.