- Issue created by @shailja179
- 🇫🇷France nod_ Lille
Please explain more in detail what breaks, how, in which situations etc.
- 🇮🇳India shailja179 India
We are running a Drupal 10 site. But intermittently, ajax on all over site gets break.
And we are clearing the Drupal cache, it works again. What could be the reason for this behaviour, we are not sure. We would have to see technical information to provide technical help.
- Status changed to Postponed: needs info
5 months ago 4:53pm 7 August 2024 - 🇬🇧United Kingdom longwave UK
links with use-ajax class redirecting instead of opening pop up
This suggests a JavaScript error; are there any JS errors in the console when this happens?
- 🇨🇷Costa Rica yuvania
Did you notice if this issue started after an update? You might also want to check the logs and JavaScript console for specific errors, and maybe try disabling the cache temporarily to see if that helps isolate the cause
- 🇬🇧United Kingdom tce
I have started experiencing this, it might be the same issue as it's a fairly recent bug for me.
AJAX on forms stop working and work again after clearing cache. I can replicate the issue by following the below steps...
1) Clear the Drupal cache
2) Visit the page the form is on but have the ajax related params in the URL. E.g.https://www.mysite.com/form?ajax_form=1&_wrapper_format=drupal_ajax&_wrapper_format=drupal_ajax
3) Visit the form page as usual, AJAX is now brokenIt seems that in step 2, caching for the form is happening, but it's caching empty values. It's caching empty values in the cache_data table. The cid is like js:theme_name:en:xxxx
I'm no expert, but to me the issue is the way the AssetResolver::getJsAssets creates the Cid name. It creates the same Cid name, even if the cache data is an array of empty/false values
- 🇬🇧United Kingdom tce
I tried upgrading core after reading this 👉 https://www.drupal.org/project/drupal/issues/3443108 📌 Optimize AssetResolver caching Fixed but I still get the issue with Drupal version 10.3.6