- 🇺🇸United States johnhanley
I just ran into the infamous "maximum file size" bug when attempting to Ajaxify a Views exposed filter form field with Drupal 9.5.3. I applaud the efforts to resolve this issue and look forward to a final solution.
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - 🇳🇱Netherlands timohuisman Leiden, Netherlands
This should resolve the PHPCS errors from #124. The reroll is based on #94 against 9.5.x.
- last update
over 1 year ago 30,337 pass, 3 fail - 🇬🇷Greece Savvas.Tsarouchas@intrasoft-intl.com
Is #126 🐛 Ajax attached to Views exposed filter form does not trigger callbacks Needs work safe to use for Drupal 9.5.5?
Thank you for any response.
- 🇬🇧United Kingdom farse
I am using 9.5.8 and of the patches that could be applied none of them worked for my situation. I just have some exposed filters based on taxonomy terms (I want to update one when the other is updated) and I am still getting the "maximum file size" bug when trying I applied #96 and #108
- 🇬🇷Greece Savvas.Tsarouchas@intrasoft-intl.com
I am using Drupal 9.5.5. In all of the patches (apart from the one in #108) the changes related to the ExposedFilterAJAXTest.php
cannot be applied.Kind regards,
Savvas - 🇪🇨Ecuador dmezquia UTC-5
#129 works for 9.5.9 and 9.5.10, but it only works for a first request, from the second request/change select it doesn't work, it always shows me the same values of the first request, even with clean caches.
- 🇬🇪Georgia almador
Experiencing the same problem as in #131, the first time selection for the exposed filter worked fine (after updating the page), but the second one is not working with "
Maximum call stack size exceeded
" error.Patch from #129 is applied.
- 🇺🇦Ukraine vselivanov Kyiv, Ukraine
Patch #126 doesn't work for me with the recent Drupal 10.2.6.
We used it previously, but now we found a bug with Media Library widget.Steps to reproduce:
1. With applied patch #126 go to the node edit page with Image field, open popup with Media Library widget.
2. In the view with existing images below the upload area go to the 2nd page (with ajax pager)
3. Select image and click Insert selected.
4. You get an Ajax error in console.With Drupal 10.2.6 I applied the patch #116, but without tests (sorry for that).
I don't think this is the right approach because of hardcoded view id:
$this->id() !== 'media_library'
But it works good for me as a hotfix. The patch no longer applies for Drupal 10.3. Also, this should probably be converted to use a Merge Request, so that tests can be run.
solideogloria → changed the visibility of the branch 2842525-form_views_exposed_form_alter_ajax_call to hidden.
solideogloria → changed the visibility of the branch 2842525-ajax-attached-to to hidden.
solideogloria → changed the visibility of the branch 11.x to hidden.
solideogloria → changed the visibility of the branch 10.3.x to hidden.
I created a merge request targeting 11.x. The exception for Media Library is not included. It would be better to figure out the root cause of that issue, because a user could have their own view with that ID, and it's not a good idea to hardcode an ID to exclude it.
All future changes should be applied to the MR, instead of as a patch. The GitLab pipeline won't run for patch files.
There are a couple failing tests.
- A test added in the MR is failing: Test Failure
- A test related to Media Library: Test Failure
- 🇨🇳China lawxen
Please ignore this patch for core maintainer
Just a reroll of #124 for old Drupal 9.5.2 with no test code - Merge request !9188[10.3.x-only-DO-NOT-MERGE] Ajax attached to Views exposed filter form does not trigger callbacks → (Closed) created by scott_euser
- 🇬🇧United Kingdom scott_euser
scott_euser → changed the visibility of the branch 10.3.x to hidden.
- 🇬🇧United Kingdom scott_euser
The tests fail because if you actually reproduce the steps in the tests the ajax request called is missing the view_name and other parameters always added to other ajax requests when you submit the form or pager normally:
- Import core/modules/views/tests/modules/views_test_config/test_views/views.view.test_content_ajax.yml
- Enable views_test_exposed_filter module
- Go to /test-content-ajax
- Type something in the 'title' field and see the ajax request fail
So for example currently the code changes make the URL like this:
/views/ajax?status=All&type=All&title=value&langcode=All&items_per_page=50&ajax_form=1&_wrapper_format=drupal_ajaxWhich is missing the details in in Drupal.views.ajaxViews[views_dom_id:CURRENT-DOM-ID-HERE] which in my case looks like this for currrent dom id:
"views": { "ajax_path": "/views/ajax", "ajaxViews": { "views_dom_id:4b579992449b05c22a7bbe74079e4bbf68828038d659fd90855471f9f50b91ad": { "view_name": "test_content_ajax", "view_display_id": "page_1", "view_args": "", "view_path": "/test-content-ajax", "view_base_path": "", "view_dom_id": "4b579992449b05c22a7bbe74079e4bbf68828038d659fd90855471f9f50b91ad", "pager_element": 0 } } },
Yet if you use the normal exposed filter submit form or use the pagination, you can see the view_name, view_display_id, etc from the JSON getting added to the query strings of those ajax requests.
I don't quite know how to fix that; but I wonder if the solution also needs to extend the JS in core/modules/views/js/ajax_view.js like the pager does there, to add in the additional missing details that should get passed as part of the ajax request.
- 🇬🇧United Kingdom scott_euser
Actually it does work as is, but the trigger must happen by clicking outside of the field, not as autocomplete. So perhaps autocomplete could be considered as a separate issue to keep the scope to this limited. Screencast of this working attached, Tests updated to match with comment.
- Status changed to Needs review
3 months ago 4:17am 19 August 2024 - 🇬🇧United Kingdom scott_euser
- Updated issue summary to use standard template
- Hid patches
Tests are now passing. Ready for review.
- First commit to issue fork.
- Status changed to Needs work
3 months ago 1:11pm 23 August 2024 - 🇺🇸United States smustgrave
Rebased it and seems to be causing a javascript error.
Only code change I made was https://git.drupalcode.org/project/drupal/-/merge_requests/8527/diffs?co... for typehints in tests
- 🇬🇧United Kingdom scott_euser
Tested it out and its a legitimate error caused by this. Steps to reproduce the test failure:
- Add an 'Unlimited' media field to eg basic page
- Upload enough images to get to multiple pages (e.g. drastically reduce the items per page at /admin/structure/views/view/media_library)
- Click add media
- Navigate to page 2
- Select an image
- Navigate back to page 1
- Press insert selected
- Media library window does not close
- 🇬🇧United Kingdom andreastkdf
andreastkdf → changed the visibility of the branch 10.3.x to active.
- Merge request !9448[10.3.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks → (Closed) created by andreastkdf
- 🇪🇸Spain abarrio
Reroll of patch from #144 to be used on 10.3.5 version.
- 🇯🇴Jordan ahmad abbad Jordan
Patch #159 is working but I have the same issue mentioned in #155