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.

Command icon 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

drunken monkey created an issue. See original summary.

drunken monkey’s picture

Status: Active » Needs review

Assuming that the check is simply there to ensure the getComponent() method exists, this MR contains a corresponding fix.

mkalkbrenner made their first commit to this issue’s fork.

mkalkbrenner’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.