[solved] AJAX search returns no value with the complete word

8 years 1 month ago - 8 years 1 month ago #40989 by hede
My index contains "Canary Islands". When I enter "canar" in the search box I get "Canary" in the AJAX return list. When I enter "canary" I get nothing. Same here: "canary island" returns "Canary Islands", "canary islands" returns nothing.

What goes wrong here?

Cheers

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

Please Log in or Create an account to join the conversation.

8 years 1 month ago #41126 by ggppdk
Hello

yes indeed, i will commit fix for this


1. to apply / test fix now, edit file
component/com_flexicontent/controller.php

find about line 176):
$regex = '/(\b)('.$word_prefix.'\w+)(\b)/iu';
replace with:
$regex = '/(\b)('.$word_prefix.'\w*)(\b)/iu';


2. to avoid problem with words listed multiple times because of different letter casing, add (in same file):
$_m = mb_strtolower($_m, 'UTF-8');

just before:
$words_found[$_m] = 1;


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

8 years 1 month ago #41145 by hede
In my file it was line 132, but the problem persists.

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

Please Log in or Create an account to join the conversation.

8 years 1 month ago #41159 by hede
Thx for r1791. The entire word brings up an AJAX search result. But now when I use the found word, in my case the category "Canary" and hit the Go button the search returns no result.

You can test it here:
http://www.devj3.kiteboarding-windsurfi ... hp?lang=en

cheers

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.