Illegal mix of collations (error 500, RuntimeException) after Update to 3.0.17

Started by extonjaez, June 08, 2016, 14:01:49 PM

Previous topic - Next topic

extonjaez

Hello,

I have this error (Illegal mix of collations (error 500, RuntimeException)) when i click on products details after update from 3.0.16 to 3.0.17.
see the picture :
https://gyazo.com/7d84567049519254df012b205fcd02d6
Many thanks for your help
Best Regards
Arnaud

System Information
PHP Built On    Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
Database Version    5.1.73-1+deb6u1
Database Collation    latin1_swedish_ci
Database Connection Collation    utf8_general_ci
PHP Version    5.5.36
Web Server    Apache
WebServer to PHP Interface    cgi-fcgi
Joomla! Version    Joomla! 3.5.1 Stable [ Unicorn ] 05-April-2016 22:45 GMT
Joomla! Platform Version    Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent    Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0

GJC Web Design

well, I guess it is as the error says .. you have a mix of collations and mysqli doesn't like it

FYI .. all my tables are utf8_general_ci
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

extonjaez


jenkinhill

Firstly VM3.0.17 is a test/development version for experienced users, and if you used the release on http://dev.virtuemart.net/projects/virtuemart/files it has already had several fixes and updates - if you really want to test it the latest fiiles are on SVN, http://dev.virtuemart.net/projects/virtuemart/repository

I have never seen anyone have a  collation issue before with VM, but it is a relatively simple matter to change collation using phpMyAdmin - Google for a "how to" with your host setup. Test on a copy of the db, of course!!!
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

franzpeter

@extonjaez
The error comes with the db query LEFT JOIN #__users. It is in /admininistrator/components/com_virtuemart/models/ratings.php on line 182.
You can try to exchange the line 182 where it reads:
private static $_select = ' `u`.*,`pr`.*,`l`.`product_name`,`rv`.`vote`, IFNULL(`u`.`name`, `pr`.`customer`) AS customer ';

with:
private static $_select = ' `u`.*,`pr`.*,`l`.`product_name`,`rv`.`vote`, IFNULL(`u`.`name` COLLATE utf8mb4_unicode_ci, `pr`.`customer`) AS customer ';

if that is not enough, it is possible too in addition to replace it like that:
private static $_select = ' `u`.*,`pr`.*,`l`.`product_name`,`rv`.`vote`, IFNULL(`u`.`name` COLLATE utf8mb4_unicode_ci, `pr`.`customer` COLLATE utf8_general_ci) AS customer ';
Hope it will help!

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/