Problem/Motivation

Enabling facet_api without search_api is possible (not marked as dependecy) but it troubles the config screens.

Log:
Got error 'PHP message: Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: "The "search_api_index" entity type does not exist." at /var/www/drupal8/core/lib/Drupal/Core/Entity/EntityTypeManager.php line 130

IRC chat log:
Novitsh: Nick_vh: can facet_api run without search_api?:
Nick_vh: yes, it should be possible to run - but I don’t think it is fully independent yet

Proposed resolution

  1. Mark search_api as dependency.
  2. Make it standalone.

Remaining tasks

@todo

Data model changes

@tocheck

Comments

Novitsh created an issue. See original summary.

Novitsh’s picture

Issue summary: View changes
borisson_’s picture

Issue summary: View changes

We should make sure that facet api also works for core search, so search_api shouldn't be a hard dependency.

marthinal’s picture

IntegrationTest is using Search API test modules.

public static $modules = ['views', 'node', 'search_api', 'search_api_test_backend', 'facetapi', 'search_api_test_views', 'block'];

So we need to change it.

Also we have a hardcoded usage here:

        // Hardcoded usage of search api views, for now.
        if (strpos($view->get('base_table'), 'search_api_index') !== FALSE) {
          $displays = $view->get('display');
borisson_’s picture

The hardcoded usage of search_api is in the SearchApiViews facet source classes, this is ok.

So this means that we should basically only decouple the tests?

marthinal’s picture

Yes. Maybe create a FacetAPI submodule(something like https://www.drupal.org/project/search_facetapi) for the Core Search. And then enable the Core SEarch module +the submodule. In this case we could try to reproduce the current Integration tests but using the Core Search...

borisson_’s picture

Addded a new issue for creating the core facet source. #2612084: Add a new facet source for drupal core

  • borisson_ committed 632b250 on 8.x-1.x
    Issue #2609970: Search_api is a needed dependency (for now?) for...
borisson_’s picture

Status: Active » Fixed

Opened up an issue for the test (#2613186: Untangle the integration test from search api). Other remarks from this issue have been fixed. Thanks for the report @Novitsh

Status: Fixed » Closed (fixed)

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