VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: Dreakman on July 07, 2015, 17:05:09 pm

Title: 1271 - Illegal mix of collations o frontend search
Post by: Dreakman on July 07, 2015, 17:05:09 pm
Hello,
after entering non-latin characters in search module i have this error:

Code: [Select]
1271 - Illegal mix of collations for operation 'like' SQL=SELECT SQL_CALC_FOUND_ROWS p.`virtuemart_product_id` FROM `db_virtuemart_products` as p LEFT JOIN `db_virtuemart_product_shoppergroups` as ps ON p.`virtuemart_product_id` = `ps`.`virtuemart_product_id` LEFT JOIN `db_virtuemart_product_categories` as pc ON p.`virtuemart_product_id` = `pc`.`virtuemart_product_id` LEFT JOIN `db_virtuemart_categories` as c ON c.`virtuemart_category_id` = `pc`.`virtuemart_category_id` LEFT JOIN `db_virtuemart_product_prices` as pp ON p.`virtuemart_product_id` = pp.`virtuemart_product_id` WHERE ((`p`.created_on LIKE "%Р±%" OR `p`.product_sku LIKE "%Р±%" OR `product_price` LIKE "%Р±%" OR `p`.product_sales LIKE "%Р±%") AND ((p.`product_parent_id` = "0" AND `pc`.`virtuemart_category_id` > "0") OR p.`product_parent_id` > "0") AND ((p.`product_parent_id` > "0" AND `pc`.`virtuemart_category_id` > "0") OR p.`product_parent_id` = "0") AND `c`.`published` = 1 AND ( `ps`.`virtuemart_shoppergroup_id`= "2" OR `ps`.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`="1" ) group by p.`virtuemart_product_id` ORDER BY `pc`.`ordering` ASC LIMIT 0, 9
Des anybody have any idea how to fix it ?
Best Regards!
Title: Re: 1271 - Illegal mix of collations o frontend search
Post by: Milbo on July 08, 2015, 20:35:37 pm
Please give your versions, and php version and if you use the mb_ functions
Title: Re: 1271 - Illegal mix of collations o frontend search
Post by: Dreakman on July 10, 2015, 22:11:08 pm
Hello and hanks for your reply!

Joomla: 3.4.1
VM: 3.0.8

I don't have any mb functions.
Title: Re: 1271 - Illegal mix of collations o frontend search
Post by: Edwardocz on September 18, 2015, 15:25:42 pm
We have a website Joomla 3.4.4., VirtueMart 3.0.9 and PHP 5.6.13. MB does not. Web address: http://www.prirodni-budejovice.cz/prirodni/
I write to dandruff word with a hook, for example TEPLOMĚR. He runs the following message:

Oops!
1271 - Illegal mix of collations for operation 'like' SQL=SELECT SQL_CALC_FOUND_ROWS p.`virtuemart_product_id` FROM `jos_virtuemart_products` as p INNER JOIN `jos_virtuemart_products_cs_cz` as l using (`virtuemart_product_id`) LEFT JOIN `jos_virtuemart_product_shoppergroups` as ps ON p.`virtuemart_product_id` = `ps`.`virtuemart_product_id` LEFT JOIN `jos_virtuemart_product_categories` as pc ON p.`virtuemart_product_id` =

Write the word TEPLOMER without a hook, and find the right.

Author template he wrote this: "We provide support for the code that we developed (Template) Issue that you are reporting is generated by default Virtuemart script."
 
Thank you for your help and eliminating errors in the code Virtuemart
Title: Re: 1271 - Illegal mix of collations o frontend search
Post by: sandomatyas on May 03, 2016, 07:10:10 am
Check your settings if 'Creation Date' is an available search field. Virtuemart uses these fields to construct the select query using LIKE '%..%' but 'Creation date' is a datetime field which doesn't have collation.
Title: Re: 1271 - Illegal mix of collations o frontend search
Post by: copierx on January 18, 2017, 14:36:42 pm
Thank you sandomatyas. your solution fixed my problem.
Title: Re: 1271 - Illegal mix of collations o frontend search
Post by: Milbo on January 18, 2017, 15:55:10 pm
That means you had to disable this field to get it running? I would like to fix that.
Title: Re: 1271 - Illegal mix of collations o frontend search
Post by: sandomatyas on January 28, 2017, 15:28:33 pm
yes, that's right
Title: Re: 1271 - Illegal mix of collations o frontend search
Post by: Milbo on January 29, 2017, 12:29:24 pm
Check your settings if 'Creation Date' is an available search field. Virtuemart uses these fields to construct the select query using LIKE '%..%' but 'Creation date' is a datetime field which doesn't have collation.

Yeah and therefore it cant be a mix of collations.
Hmmm, I renamed cap against cäp and enabled any search fields

Array
(
   
Title: Re: 1271 - Illegal mix of collations o frontend search
Post by: sandomatyas on July 06, 2017, 09:39:06 am
Got the same problem with VM 3.2.2