Page 1 of 2

Cachy is incompatible with the search plugin

Posted: Sat Jan 05, 2019 5:51 am
by rahuldottech
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.

Re: Cachy is incompatible with the search plugin

Posted: Sat Jan 05, 2019 9:51 pm
by Edi
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.

Re: Cachy is incompatible with the search plugin

Posted: Sun Jan 06, 2019 5:27 am
by rahuldottech
Thanks for your response. Is there a solution to this? Any way to exclude pages from Cachy?

Re: Cachy is incompatible with the search plugin

Posted: Sun Jan 06, 2019 12:11 pm
by Edi
I asked Diego to have a look at it.

Re: Cachy is incompatible with the search plugin

Posted: Mon Jan 07, 2019 2:34 pm
by diego
Try to add this line before the line 162 of the plugin Cachy.

Code: Select all

if ($GLOBALS['WHERE_AM_I'] !== 'page') { return false }

Re: Cachy is incompatible with the search plugin

Posted: Mon Jan 07, 2019 4:51 pm
by rahuldottech
This worked! Thanks sooooo much!

Re: Cachy is incompatible with the search plugin

Posted: Sun Apr 19, 2020 8:56 pm
by dontodd
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.

Re: Cachy is incompatible with the search plugin

Posted: Mon Jan 11, 2021 4:57 pm
by RalfKerkhoff
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

Re: Cachy is incompatible with the search plugin

Posted: Mon Jan 11, 2021 6:43 pm
by Edi
With the plugin Cachify activated?

Re: Cachy is incompatible with the search plugin

Posted: Mon Jan 11, 2021 6:57 pm
by RalfKerkhoff
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