- 🇺🇸United States hungdo
Re-roll the patch file for Drupal 10.2.7, search api 1.3
- 🇫🇷France dco
Hi,
Patch #23 (3209441-23--cache_metadata_search_api_excerpt_field did) didn't solve for me.
Drupal 10.3.6
Search Api 8.x-1.35The excerpt is visible when logged-in but not for anonymous users
Probably not a cache problem.
- 🇫🇷France dco
Solved
2 patches are needed, this one (#23) and #12 (read below)
https://www.drupal.org/project/search_api/issues/3284807#comment-15826249 🐛 Incorrect Search API (tag-based) cached excerpt highlighting for subsequent search with a different term but same result items Needs work
- 🇦🇹Austria drunken monkey Vienna, Austria
Thanks a lot for your feedback, this is very valuable information!
I now combined these two patches into a new MR. Would be good to get some more confirmation from people that this either helps or at least doesn’t make things worse for them.
My big problem is that I can still not reproduce this, so can’t confirm this is properly working.
And, in any case, we definitely still need a regression test for this before it can be merged. I don’t think it should be too hard to add this as a new method to our existing\Drupal\Tests\search_api\Kernel\Views\ViewsDisplayCachingTest
or\Drupal\Tests\search_api\Functional\ExcerptFieldTest
? (I changed the latter to use caching for its view in the hope that this would already let the test fail, but no dice.)
Would someone be able to work on this? - 🇦🇹Austria drunken monkey Vienna, Austria
Huh, for some reason switching caching for the view to “Search API (tag-based)” breaks the existing test for the “Create excerpt even if no search keys are available” option, no idea why: