distantnative / search-for-kirby

Kirby 3 plugin for adding a search index (sqlite or Algolia).
43 stars 3 forks source link

"e is not defined" #48

Open bvrp opened 3 years ago

bvrp commented 3 years ago

Describe the bug

Getting "e is not defined" when having Search build it's DB.

I am using Dreamhost, which I believe should have all required modules for PHP and SQLite3 installed?

My phpInfo() is here: https://www.bohonus.com/phpinfo.php

What is the issue? Can the error message be more descriptive?

Steps to reproduce

1. 1. 1.

Expected behavior

Additional context

E.g. screenshots

Specifications

sebastiangreger commented 3 years ago

I get the same error (Kirby 3.5.3, Search 1.1.1, PHP 7.4.14, sqlite 3.22.0, Firefox/Linux). The panel error seems to stem from the server returning an HTTP 500 error on the POST request to /api/search that is sent after clicking on "Missing search index. Click to create.":

{
    "status": "error",
    "message": "Invalid table: models",
    "code": 500,
    "exception": "InvalidArgumentException",
    "key": null,
    "file": "Query.php",
    "line": 259,
    "details": [],
    "route": "search"
}
caplod commented 2 years ago

I had the same problem and managed to debug it to a missing sqlite extension fts5.

You can check if it is activated:

sqlite> pragma compile_options; COMPILER=gcc-10.2.1 20210220 ENABLE_BYTECODE_VTAB ENABLE_COLUMN_METADATA ENABLE_DBSTAT_VTAB ENABLE_FTS3 ENABLE_FTS3_PARENTHESIS ENABLE_FTS3_TOKENIZER ENABLE_FTS4 ENABLE_FTS5 << check this ENABLE_JSON1 ENABLE_LOAD_EXTENSION ENABLE_PREUPDATE_HOOK ENABLE_RTREE ENABLE_SESSION ENABLE_STMTVTAB ENABLE_UNKNOWN_SQL_FUNCTION ENABLE_UNLOCK_NOTIFY ENABLE_UPDATE_DELETE_LIMIT HAVE_ISNAN LIKE_DOESNT_MATCH_BLOBS MAX_SCHEMA_RETRY=25 MAX_VARIABLE_NUMBER=250000 OMIT_LOOKASIDE SECURE_DELETE SOUNDEX THREADSAFE=1 USE_URI