As part of #3581588: D12 deprecations, \Drupal\search_api_solr\SolrSpellcheckBackendTrait::extractSpellCheckSuggestions() was edited to only process results of type \Drupal\search_api_solr\Solarium\Autocomplete\Result. Unfortunately, I could not determine the reason for this change, the commit in question was just titled “more findings”.
Anyways, this naturally breaks spellcheck functionality when used, e.g., as part of a view (“Search API Spellcheck "Did You Mean"” or “Search API Spellcheck "Suggestions"” area plugins). I checked and the code works perfectly fine when removing the $result instanceof AutocompleteResult check again. Since I don’t know the reason behind the original change, just removing the check again might not be the correct solution, but in any case this code should be fixed to also work for non-autocomplete search results again.
Issue fork search_api_solr-3584681
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
drunken monkeyAssuming that the check is simply there to ensure the
getComponent()method exists, this MR contains a corresponding fix.Comment #5
mkalkbrenner