When trying to create a facet from the search api pages source it does not load the fields to be referenced and if i where to hit save i get an HTTP ERROR 500, no errors on the system log.

It works fine when using views for the source but wont work at all with the Search API pages module.

Comments

wolfhowling created an issue. See original summary.

wolfhowling’s picture

Issue summary: View changes
martinpe’s picture

Priority: Normal » Critical

+1!

Found the problem:

When trying to create a Facets from a Facet Source owned by search_api, then a serious error occurs:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "search_api.results_static_cache". in Drupal\Component\DependencyInjection\Container->get()

I looked into the facet module and on Line 54 in SearchApiBaseFacetSource.php facet is trying to access a service which does not exist.

    /** @var \Drupal\search_api\Query\ResultsCacheInterface $results_cache */
    $search_results_cache = $container->get('search_api.results_static_cache');

Maybe search_api has renamed or removed it. Whatever it is, the code needs to be fixed ASAP.

borisson_’s picture

martinpe’s picture

Yes, saw that afterwards. And why is this not fixed yet?

borisson_’s picture

Priority: Normal » Major

It works fine when using views for the source but wont work at all with the Search API pages module.

This probably means that something with the facet source implemented in search api pages is wrong, but it also might be related to the same issue as #2776711: non-existent service "search_api.results_static_cache".

I'll keep this issue here for now, but depending on the outcome in the other issue we might have to move this the Search API Pages module.

Yes, saw that afterwards. And why is this not fixed yet?

You are free to help us out by helping figure out #2777483: Unmet dependencies - as we're getting to the root of the problem there.

borisson_’s picture

Status: Active » Closed (duplicate)

Closing this, as it's no longer relevant.