VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: usermee on February 22, 2017, 19:14:17 PM

Title: Search Issue with Apostrophe / ' / #39 / % / * / Special Characters
Post by: usermee on February 22, 2017, 19:14:17 PM
Hello,

There is a major bug (in my opinion it is major) that has been persistent from as far back as I can remember with the Virtuemart Search Module.

Searching anything with an apostrophe and a few other special characters which I have tested seems to get stripped from the search results and result in either incorrect results or zero results, i.e.:

Searching for something like "assassin's" would result in search results displaying "assassins" and so forth, either not displaying the correct product or displaying zero results if a product by the name of assassins does not exist.

I have tried various fixes and workarounds, however none seem to be working for Virtuemart 3.0.19 or older.

Does anyone have a solution to this bug and if so I would request that it gets added to the next build of VM for ALL other VM users to benefit from a working Search Module.

Thank you for your assistance.
Title: Re: Search Issue with Apostrophe / ' / #39 / % / * / Special Characters
Post by: Milbo on February 25, 2017, 08:46:03 AM
This chars are removed due security reasons. There are search plugins, which may handle that better. It takes a lot time and must be done very carefull to lighten the filter for the search
Title: Re: Search Issue with Apostrophe / ' / #39 / % / * / Special Characters
Post by: usermee on February 26, 2017, 12:09:56 PM
Hello Milbo,

Thanks for your response.

I am not too concerned with the rest of the special characters, however the apostrophe is a big one (as it is something very commonly used in words) and would like to be able to fix searches to not strip apostrophes as it then seems like products are not in stock when they actually are.

Which file should I be looking at and do you perhaps have a piece of code or a code edit which could fix this?

I am sure there are many other VM users who would like to see this fixed besides me.
Title: Re: Search Issue with Apostrophe / ' / #39 / % / * / Special Characters
Post by: daclina on March 02, 2017, 08:19:36 AM
Quote from: Milbo on February 25, 2017, 08:46:03 AM
This chars are removed due security reasons. There are search plugins, which may handle that better. It takes a lot time and must be done very carefull to lighten the filter for the search

It seems Joomla's default search has no issues with these characters. In fact it actually finds the results just fine including special characters, but the VM search displays them far better.

Would a simpler approach not be to allow the VM search to use the Joomla default search engine, but strip out the non VM results and show the array of results in the grid?
Title: Re: Search Issue with Apostrophe / ' / #39 / % / * / Special Characters
Post by: usermee on March 08, 2017, 22:44:02 PM
Hi Milbo,

Any assistance with this would be greatly appreciated. All I require are for searches with apostrophes to work. Having a store with hundreds or thousands of products makes this an essential function.

Does anyone else have a possible workaround or fix for this?
Title: Re: Search Issue with Apostrophe / ' / #39 / % / * / Special Characters
Post by: Milbo on March 08, 2017, 23:34:20 PM
I think it is the filter uword, in vRequest
Title: Re: Search Issue with Apostrophe / ' / #39 / % / * / Special Characters
Post by: hegbi on November 30, 2017, 23:16:41 PM
Hi Milbo, searches with apostrophe are really needed, especially for media shops, any plans to work on this?