- Issue created by @s.messaris
- π¬π·Greece s.messaris
Here are 2 patches, one for 2.0.x, and one for 2.0.7.
- πΊπΈUnited States pbabin
All credit goes to @s.messaris . . . . 2.0.8 came out today and the patch for 2.0.7 doesn't work anymore. Copied and pasted the proposed changes and created a 2.0.8 patch.
Thank you @s.messaris for getting a handle on the "session has not been set" issue.
- π¦πΊAustralia elc
Please note that MockArraySessionStorage is only added to TESTS for KernelTestBase, and BrowserTestBase (and drush but that doesn't seem relevant here).
It should not be added to normal operation code.
I would suspect this issue is more to do with session not being specifically saved and added to the response.
- πΊπΈUnited States pbabin
@ELC - I greatly appreciate you chiming in on this. I'm still "relatively" new to Drupal so getting feedback like this is extremely helpful.
I'm curious as to why an earlier approach for pre 2.0.8 isn't also under your rubric as the patch I submitted was just a copy of previous work. Is it safe to assume that this entire approach isn't recommended?
I came this way from Facets with AJAX not working in most of situations β where Patch 237 β addressed our the issue with the session not being set and this comment π Facets with AJAX not working in most of situations Needs review directs individuals over to this issue as a proposed solution.
Since 2.0.8 came out, the patch 237 no longer works and the patch I proposed is not recommended so we are still stuck with facets that are completely broken because we are getting the "session has not been set" error coming up.
Any recommendations on how to address this issue in a more Drupal appropriate way are greatly appreciated.
- Status changed to Closed: duplicate
3 months ago 2:50am 20 August 2024 - π¦πΊAustralia elc
My apologies, I missed that the previous patches were also adding test classes into running code.
The issue for me is actually a combination of these:
- #3052574-254: Facets with AJAX not working in most of situations β
- #3466566-3: New $request created in FacetBlockAjaxController missing ajax_page_state β
- #2986981-42: Ajax facet block seems to lose Views context (filters, etc) β
Unfortunately, they do not apply cleanly because they are all changing the same code. I added a custom patch to 3466566 to apply after 3052574.
I've had to patch all of them in to get my situation working. It would be ideal if all of this was fixed as one. There is a META issue π± [META] Overview of Facets + Ajax issues Active for the known issues of Facets + Ajax, of which there are a few. Doesn't look like 3466566 has been made part of that yet. This Ajax issue has been hanging around for a very long time.
The session issue is addressed in #3052574-254: Facets with AJAX not working in most of situations β , so closing this as duplicate.
- Status changed to Needs review
about 5 hours ago 4:50am 21 November 2024 π Facets with AJAX not working in most of situations Needs review has an elaborate fix for a different issue that happens to also resolve this - but that issue has been open for 5 years and may not land any time soon. I'm attaching a patch for this issue that just resolves the Session error introduced in Core 10.3