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: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
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.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
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: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

I asked Diego to have a look at it.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
diego
Site Admin
Posts: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
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: 17
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
Sr. Bludit
Posts: 35
Joined: Sun Jan 03, 2021 11:16 am
Location: Germany
Has thanked: 1 time
Contact:

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: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

With the plugin Cachify activated?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
RalfKerkhoff
Sr. Bludit
Posts: 35
Joined: Sun Jan 03, 2021 11:16 am
Location: Germany
Has thanked: 1 time
Contact:

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