#1 March 25, 2014 9:05am

asiral
Member
Registered: May 18, 2013
Posts: 40

Possible Bug in Module Search

Since upgrading from BigTree 4.0RC2 to 4.0.2, I noticed searching in-page for a module does not work as well.  The interface I'm referring to is when you click on 'Modules' in the main menu and then click and Module.  From that table, the search results quality seems reduced.  Here is some debugging info if it's helpful.

The query being generated is something like the this:

SELECT * FROM bigtree_module_view_cache WHERE view = '29' AND (column1 LIKE '%home%' OR column2 LIKE '%home%' OR column3 LIKE '%home%')This query is generating by converting all the search parts to lowercase but then does not return any results that contain the word 'Home' in uppercase, even though that is what the search query was.

Hope this helps, let me know if you need any more info.

-Michael

Offline

#2 April 16, 2014 2:17pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 932

Re: Possible Bug in Module Search

The file that runs all database updates between versions is:

/core/admin/modules/dashboard/update/default.php

It does do a few ALTER queries between RC2 and 4.0.2

Offline

#3 April 8, 2014 2:31am

asiral
Member
Registered: May 18, 2013
Posts: 40

Re: Possible Bug in Module Search

Should I then change the collation on all the tables in the database to utf8_general_ci?

Offline

#4 April 8, 2014 10:19am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 932

Re: Possible Bug in Module Search

I'd recommend it, but it should only affect searches.

Offline

#5 April 16, 2014 2:41am

asiral
Member
Registered: May 18, 2013
Posts: 40

Re: Possible Bug in Module Search

I just realized a few things.  For security reasons, the MySQL user for BigTree in our implementation has been limited to certain operations (INSERT, DELETE, etc.) but either the upgrade did not include these migrations or it didn't indicate an error in the queries to update the collations and they just failed because of the operation limitation.  If the latter is true, can you point me to the script where these queries are so I can verify they were all executed?

Offline

#6 March 25, 2014 9:23am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 932

Re: Possible Bug in Module Search

I think this is due to the collations for the tables being off in the RC releases. I think the collation on bigtree_module_view_cache was previously utf8_bin which is case sensitive when doing the LIKE statements. In the 4.0 official release it should be utf8_general_ci which is case insensitive.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.