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.
If you enable ajax and show a form the HTML / JS code get's cached. If you now disable the Ajax setting the cache is still active. You will not get the new form.
To repro you just need to change the widget color if you disable the Ajax setting and the new color is not loaded
Comment | File | Size | Author |
---|---|---|---|
#6 | Issue-2500335-by-hass-Cache-not-invalidated-after-Aj.patch | 929 bytes | hass |
Comments
Comment #1
hass CreditAttribution: hass commentedComment #2
Liam Morland@hass, do you know where this is getting cached and how to trigger a clear?
Comment #3
hass CreditAttribution: hass commentedI guess in page cache. We can do a clear if this setting is changed in the form.
Comment #4
Liam MorlandI'm not seeing this problem, but maybe I am not reproducing it properly. Can you provide steps to reproduce it?
Comment #5
hass CreditAttribution: hass commentedThat is quite easy to fix. I'm only not sure if we need to clear the full page cache or if we may only clear the cached forms.
Comment #6
hass CreditAttribution: hass commentedHaven't tested if this code, but this how this could be done. The only thing I'm not sure is where the page is cached. It could be cache_page or cache_form. We need to verify this and if we could provide the cache ID it would be a lot faster.
Comment #7
Liam MorlandI can't reproduce the problem, though I was not trying on a complete clean install, so that might be why. I did see the message "The CAPTCHA module will disable the caching of pages that contain a CAPTCHA element" on the Performance page when I went there to turn on the page cache. If statement is true, I don't see how the reCAPTCHA can be getting cached anyway.
Comment #8
hass CreditAttribution: hass commentedhttp://cgit.drupalcode.org/recaptcha/tree/recaptcha.module?h=7.x-1.x#n90
If ajax is enabled the caching is re-enabled and disabled caching of captcha module is therefore overridden.
Comment #9
hass CreditAttribution: hass commentedHave you now understood the code of the module your are maintaining?
Comment #11
Liam MorlandThanks.