- Issue created by @timwood
- First commit to issue fork.
- π³π±Netherlands Lendude Amsterdam
Added the proposed code and a test assertion. I can see this happen when testing manually, but the test isn't catching it.
The assertion detects the session when I log a user in a test, so that part works, but in the test, the reset is not triggering the bug. Haven't figured out why yet - Status changed to Needs work
6 days ago 1:54pm 3 March 2025 - πΊπΈUnited States tregonia
Currently rubbing up against this issue in D11. I can confirm that the patch does apply, but does not not prevent the anonymous sessions from being created.
- πΊπΈUnited States tregonia
In my instance, I am finding that the code never reaches the
resetForm
function.The call to
resetForm
is on line 292, but does not make it into the if statement. This is due toop
not being in theform_state
within theexposedFormSubmit
function.
https://git.drupalcode.org/project/drupal/-/blob/9.4.x/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php#L292 - πΊπΈUnited States timwood Rockville, Maryland
In testing the MR on a 10.3.13 site, I can confirm that the patch applies there and prevents anonymous sessions from being created.
I also tested the 11.x branch on simplytest.me with and without the MR patch. When using the patch, I do not see cookies being set when clicking a reset button. When not using the patch the cookie is still set.
@tregonia how did you validate the anonymous session? Did you use an incognito window or other browser to ensure you didn't already have a cookie?