Search bar fails and shows a different page

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
Abarthgtchris
Posts: 7
Joined: Wed Jul 20, 2022 11:33 am

Search bar fails and shows a different page

Post by Abarthgtchris »

I'm currently having a strange issue. I am not sure if it has something to do with the fact that I have 2 installs.

I have 2 installations done via softaculous auto install from my web host. Both on a different folder on the root of my website, once called /kb and the other called /kbGE (See picture attached)

Everything works but when I search for something in the search bar and then enter it keeps redirecting me to my website's main page and not the phpmyfaq page. For example, if I type the word "Error" and it associates it with a FAQ it will put me on my website main's index. But if I type a word and it isn't associated with anything it works fine. And If I use the advance search I have no problem.

myalthea.co.uk/kb is one of the installs
myalthea.co.uk/kbGE is the 2nd install -----> use this one for testing purpose - type error 18 or something

I keep both separate and don't want the 2 to have anything in common - purely 2 different entities.

See pictures attached

Any idea why I keeps redirecting me to my main page?
You do not have the required permissions to view the files attached to this post.
Abarthgtchris
Posts: 7
Joined: Wed Jul 20, 2022 11:33 am

Re: Search bar fails and shows a different page

Post by Abarthgtchris »

Following my previous post - here is a picture for more details.
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15373
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search bar fails and shows a different page

Post by Thorsten »

Hi,

which version did you installed? If it's v3.1.4, please update to v3.1.5

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Abarthgtchris
Posts: 7
Joined: Wed Jul 20, 2022 11:33 am

Re: Search bar fails and shows a different page

Post by Abarthgtchris »

Hi, Version 3.1.5.

Thanks
Abarthgtchris
Posts: 7
Joined: Wed Jul 20, 2022 11:33 am

Re: Search bar fails and shows a different page

Post by Abarthgtchris »

This issue seem to be related to the elasticsearch can you advise?
Thorsten
Posts: 15373
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search bar fails and shows a different page

Post by Thorsten »

Hi,

please enable the DEBUG mode in src/Bootstrap.php to get better error messages.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Abarthgtchris
Posts: 7
Joined: Wed Jul 20, 2022 11:33 am

Re: Search bar fails and shows a different page

Post by Abarthgtchris »

phpMyFAQ Fatal error
Uncaught exception: 'ErrorException'

Message: 'Undefined array key "core.elasticsearch"'

Stack trace:

#0 /home/myalthea/public_html/kbGE/src/phpMyFAQ/Configuration.php(370): phpMyFAQ\Core\Error::errorHandler(2, 'Undefined array...', '/home/myalthea/...', 370)
#1 /home/myalthea/public_html/kbGE/src/phpMyFAQ/Search/Elasticsearch.php(61): phpMyFAQ\Configuration->getElasticsearch()
#2 /home/myalthea/public_html/kbGE/src/phpMyFAQ/Search.php(198): phpMyFAQ\Search\Elasticsearch->__construct(Object(phpMyFAQ\Configuration))
#3 /home/myalthea/public_html/kbGE/src/phpMyFAQ/Search.php(92): phpMyFAQ\Search->searchElasticsearch('ereasdf', false)
#4 /home/myalthea/public_html/kbGE/search.php(158): phpMyFAQ\Search->search('ereasdf', false)
#5 /home/myalthea/public_html/kbGE/index.php(745): require('/home/myalthea/...')
#6 {main}
Thrown in '/home/myalthea/public_html/kbGE/src/phpMyFAQ/Configuration.php' on line 370
Thorsten
Posts: 15373
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search bar fails and shows a different page

Post by Thorsten »

Hi,

looks like you have Elasticsearch enabled but running Elasticsearch instance. Disable Elasticsearch in the configuration and it will work.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Abarthgtchris
Posts: 7
Joined: Wed Jul 20, 2022 11:33 am

Re: Search bar fails and shows a different page

Post by Abarthgtchris »

Hi thanks for the solution , I disabled it and it still doesn't work, only advance search works
Thorsten
Posts: 15373
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search bar fails and shows a different page

Post by Thorsten »

Hi,

do you have a different error message with DEBUG on?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Abarthgtchris
Posts: 7
Joined: Wed Jul 20, 2022 11:33 am

Re: Search bar fails and shows a different page

Post by Abarthgtchris »

I upgraded to 3.1.6 and everything is working again, it only happened with 3.1.5
Thorsten
Posts: 15373
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search bar fails and shows a different page

Post by Thorsten »

Hi,

awesome!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply