Call to a member function id() on null in Drupal\search_api_page\Form\SearchApiPageBlockForm

Created on 10 November 2023, about 1 year ago
Updated 25 January 2024, about 1 year ago

Problem/Motivation

When I Add to block on site - Search Api Page search block form its giving error on index

Error: Call to a member function id() on null in Drupal\search_api_page\Form\SearchApiPageBlockForm->buildForm() (line 112 of modules/search_api_page/src/Form/SearchApiPageBlockForm.php).

$form['search_api_page'] = [
'#type' => 'value',
Line 112 '#value' => $search_api_page->id(),
];

Error in Admin Page

Error message

Warning: Undefined array key "search_api_page" in Drupal\search_api_page\Plugin\Block\SearchApiPageBlock->calculateDependencies() (line 116 of modules/search_api_page/src/Plugin/Block/SearchApiPageBlock.php).

Warning: array_flip(): Can only flip string and integer values, entry skipped in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 278 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).

When i use normal site of search all works fine and search perfectly. Where is the problem then?

Please help with solution.

๐Ÿ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ต๐Ÿ‡ฑPoland Tesam

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024