Error when checking Latest movement - Full List

Error when checking Latest movement - Full List on product.php.
Any help, please?

Dolibarr has detected a technical error.
This information can be useful for diagnostic purposes:
Date: 20170724170611
Dolibarr: 5.0.1
Level of features: 0
PHP: 5.6.31
Server: Apache
OS: Linux br-hdi-web88.main-hosting.eu 2.6.32-673.26.1.lve1.4.20.el6.x86_64 #1 SMP Tue Dec 27 17:42:53 EST 2016 x86_64
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Requested URL: /erp/product/stock/mouvement.php?idproduct=12
Referer: http://fazendajardins.com.br/erp/product/stock/product.php?id=12
Menu manager: eldy_menu.php

Database type manager: mysqli
Latest database access request error: SELECT p.rowid, p.ref as product_ref, p.label as produit, p.fk_product_type as type, p.entity, e.label as stock, e.rowid as entrepot_id, e.lieu, m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype, m.batch, pl.rowid as lotid, pl.eatby, pl.sellby, u.login FROM mhx4_entrepot as e, mhx4_product as p, mhx4_stock_mouvement as m LEFT JOIN mhx4_user as u ON m.fk_user_author = u.rowid LEFT JOIN mhx4_product_lot as pl ON m.batch = pl.batch AND m.fk_product = pl.fk_product WHERE m.fk_product = p.rowid AND m.fk_entrepot = e.rowid AND e.entity IN (1) AND p.fk_product_type = 0 AND p.rowid = ‘12’ ORDER BY m.datem DESC LIMIT 26
Return code for latest database access request error: DB_ERROR_1267
Information for latest database access request error: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’

This is a database issue in your host:
See the last line:
Return code for latest database access request error: DB_ERROR_1267
Information for latest database access request error: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’

I’m thinking you need to change the collation from PhpMyAdmin from your host from the general settings of PhpMyAdmin change to: UTF-8 Unicode (utf8) there should only be one single server charset. Someone else can correct me if I’m wrong.

You can try to execute this request

ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;

ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;

Hi, has there been a change in the table’s name? I tried executing the request and gabe me an error. It seems table llx_stock_mouvement is now llxrf_stock_mouvement same thing with llx_product_lot which now is llxrf_product_lot am I correct?

Is this the solution to the illegal mix of collationsissue?

Thanks

BTW I fixed the issue using the wiki’s install/repair solution:
/install/repair.php?force_utf8_on_tables=confirmed for Mysql only, when Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’

source:
https://wiki.dolibarr.org/index.php/Troubleshooting

Martín

1 Like

Hi Martin,
Yep. Running https://mysite.ch/erp/install/repair.php?force_utf8_on_tables=confirmed solved the issue. Thanks for the help!
Peter

Thanks for that. Worked great.

Also I had to change install.lock to _install.lock temporarily during the process. Once it was complete, just remember to rename it back.