Closed bnomei closed 3 years ago
'search' => [
'provider' => 'sqlite',
'sqlite' => [
'file' => realpath(__DIR__ . '/../../storage') . '/search/search.sqlite', // absolute path, default points to `media/search.sqlite`
'fuzzy' => [
'pages' => ['title'],
],
],
'entries' => [
'pages' => 'site.index',
'files' => false,
'users' => false,
],
'fields' => [
'pages' => [
'title',
'date' => function ($page) {
if (in_array($page->template()->name(), ['seite', 'termine'])) {
return implode(',', $page->daysInEvents());
}
return $page->date()->isNotEmpty() ?
$page->date()->toDate('d.m.Y') :
date('d.m.Y', $page->modified());
},
'tags' => function ($page) {
return $page->tags()->isNotEmpty() ?
$page->tags()->value() :
'';
},
'newslettertags' => function ($page) {
return $page->newslettertags()->isNotEmpty() ?
$page->newslettertags()->value() :
'';
},
'standort' => function ($page) {
return $page->standort()->isNotEmpty() ?
$page->standort()->value() :
'';
},
// 'location' => function ($page) {
// $loc = $page->location()->isNotEmpty() ?
// $page->location()->value() :
// '';
//
// if ($page->blueprint()->fields()['location']['type'] === 'locator') {
// $loc = $page->eventLocation();
// }
//
// return $loc;
// },
'description' => function ($page) {
return $page->description()->isNotEmpty() ?
strip_tags($page->description()->kt()) :
'';
},
'text' => function ($page) {
return strip_tags($page->text()->kt());
},
],
],
'templates' => [
'pages' => function ($page) {
$templates = (array) option('xxx.suche.templates', []);
return in_array($page->template()->name(), $templates);
},
'files' => null,
'users' => null
],
],
"Not anymore" means you are using the latest develop branch version? Or just you're using the release and suddenly it stopped working?
i am using "distantnative/search-for-kirby": "^1.0",
. on localhost i can save the site->object (editing via panel) but on live server i can not but get that error. i checked file permissions for sqlite db of retour and all seems well (app user and www-data group)
editing other content pages in panel (that should trigger search plugin hooks) works fine. also running the forced reindex of search via CLI does not yield errors. so maybe its just something about the site object?
I would think it's the same bug fixed by https://github.com/distantnative/search-for-kirby/commit/57f4a9ffb56125c7180d875b95960996d331d8da
Or in your version the code might still look different, but removing the site hook from config/hooks.php might solve it for you too (until new version gets released alongside Kirby 3.5)
how could i miss that issue. thanks for clarifying
Easy to miss, no worries. As long as it solves your problem!