Troubleshooting with the module Configuration

Created on 24 January 2023, almost 2 years ago
Updated 4 March 2023, over 1 year ago

Problem/Motivation

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'projectname.search_api_task' doesn't exist: SELECT "base_table"."id" AS "id", "base_table"."id" AS "base_table_id" FROM "search_api_task" "base_table" LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 272 of core\lib\Drupal\Core\Entity\Query\Sql\Query.php).

Steps to reproduce

Install the Search api and dependent modules and click on the configuration

Proposed resolution

Need to check the SQL query and respected views

Remaining tasks

๐Ÿ› Bug report
Status

Postponed: needs info

Version

1.28

Component

General code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshreddymathuku Bangalore

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dineshreddymathuku
  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshreddymathuku Bangalore

    Login in to your DB admin
    Then RUN this query to create a table CREATE TABLE statement for search_api_task:

    CREATE TABLE `search_api_task` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `type` varchar(50) DEFAULT NULL,
    `server_id` varchar(50) DEFAULT NULL,
    `index_id` varchar(50) DEFAULT NULL,
    `data` longtext,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='The base table for search_api_task entities.';

    After creating this table clear cache it would be fixed.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshreddymathuku Bangalore

    using above solution we can avoid the issue but need some permanent solution

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dharmeshbarot Gujarat

    Try to run update.php it may work!

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshreddymathuku Bangalore

    Hi dharmeshbarot tried that as well but no use still facing same issue thats why need to run above query

  • Status changed to Postponed: needs info over 1 year ago
  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    The search_api_task table should be created when installing the Search API module, and it definitely works in almost all cases. (For instance, most of our automated tests โ†’ would fail if that werenโ€™t the case. But also, there would be a lot more issues complaining about this.) So, it appears there is something specific about your setup that causes the installation to not work as expected.
    Have you tried uninstalling and then reinstalling the Search API module? If so, and it didnโ€™t work, are there any error log messages? Do you have any special modules installed that affect how content entities are stored, or that modify database functionality in a fundamental way?

Production build 0.71.5 2024