- Fixed the cross-theme blank search issue in [plugin.php](/Users/tyemeclifford/Documents/GH/blog/bl-plugins/search/plugin.php).

The important change: search still intercepts the route early, but 
before themes render it now feeds results through the normal 
home/listing state. That avoids themes going blank when they do not know 
how to render a custom search state.
I also made search safer:
Indexes raw page text instead of fully rendered content.
Uses raw content for excerpts.
Guards the search call so exceptions do not white-screen the page.
Updated Dark Neon so it still detects search pages correctly after this 
compatibility change.
This commit is contained in:
Ty Clifford
2026-07-03 09:34:49 -04:00
parent 9d9790976a
commit d149a0bf8f
3 changed files with 22 additions and 9 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
<?php
$searchPlugin = pluginActivated('pluginSearch') ? getPlugin('pluginSearch') : false;
$searchValue = ($searchPlugin && $WHERE_AM_I === 'search') ? $searchPlugin->getSearchTerm() : '';
$isSearchPage = $searchPlugin && $searchPlugin->getSearchTerm() !== '';
$searchValue = $isSearchPage ? $searchPlugin->getSearchTerm() : '';
$searchMinChars = $searchPlugin ? max(1, (int) $searchPlugin->getValue('minChars')) : 1;
$searchAction = json_encode(Theme::siteUrl() . 'search/');
$socialIconMap = array(