Cachy is incompatible with the search plugin

rahuldottech
Ssr. Bludit
Posts: 27
Joined: Fri Sep 22, 2017 8:13 pm

When on PHP7, with the latest version of bludit, if I enable both plugins, I get this error:

Code: Select all

[05-Jan-2019 10:18:34 Asia/Kolkata] [INFO] [3.5] [/search/who] Plugin::webhook | Webhook requested.
[05-Jan-2019 10:18:34 Asia/Kolkata] [INFO] [3.5] [/search/who] Plugin::webhook | Webhook requested.
[05-Jan-2019 10:18:34 Asia/Kolkata] PHP Fatal error:  Uncaught Error: Call to a member function key() on boolean in /rahul.tech/bl-plugins/cachy/plugin.php:162
Stack trace:
#0 /rahul.tech/bl-kernel/helpers/theme.class.php(229): pluginCachy->beforeSiteLoad()
#1 /rahul.tech/bl-kernel/boot/site.php(17): Theme::plugins('beforeSiteLoad')
#2 /rahul.tech/index.php(41): require('/home/rahulcom/...')
#3 {main}
  thrown in /rahul.tech/bl-plugins/cachy/plugin.php on line 162
Both plugins work perfectly independently.
User avatar
Edi
Site Admin
Posts: 2202
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

I presume this happens because the "page" (this means the key of the page) with the search results cannot be found in the database file pages.php.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
rahuldottech
Ssr. Bludit
Posts: 27
Joined: Fri Sep 22, 2017 8:13 pm

Thanks for your response. Is there a solution to this? Any way to exclude pages from Cachy?
User avatar
Edi
Site Admin
Posts: 2202
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

I asked Diego to have a look at it.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
diego
Site Admin
Posts: 750
Joined: Sat May 16, 2015 2:53 pm
Contact:

Try to add this line before the line 162 of the plugin Cachy.

Code: Select all

if ($GLOBALS['WHERE_AM_I'] !== 'page') { return false }
rahuldottech
Ssr. Bludit
Posts: 27
Joined: Fri Sep 22, 2017 8:13 pm

This worked! Thanks sooooo much!
dontodd
Ssr. Bludit
Posts: 15
Joined: Tue Dec 19, 2017 1:17 am

I am running into a problem with cachy and search, too. Using Moran theme, the search results page is completely empty/blank. The fix listed above does not help but makes my entire site just a blank page. No errors show up in the logs. Weird.
User avatar
RalfKerkhoff
Ssr. Bludit
Posts: 17
Joined: Sun Jan 03, 2021 11:16 am

Hi,

with the most recent version of bludit the search results produce a error 500 when performing a search .

Any ideas or suggestions how to fix it?

Cheers
Ralf
User avatar
Edi
Site Admin
Posts: 2202
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

With the plugin Cachify activated?
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
RalfKerkhoff
Ssr. Bludit
Posts: 17
Joined: Sun Jan 03, 2021 11:16 am

Yes - with Cachy enabled the search returns a completly blank page in firefox.
Source code view in firefox shows "1".

Chrome Browser returns a:
HTTP ERROR 500

Deactivating cachy makes the search work again.

The error is independant from activating "Minify" in Cachy's settings.

Ralf
Post Reply