Bagisto: Error when creating a category

Created on 15 Apr 2020  路  5Comments  路  Source: bagisto/bagisto

Bug report

Title

SQL Error when creating a category

Issue Description

I am getting an error when I try to create a category.
"SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '=' (SQL: updatecategoriesset_lft= case when_lft>= 14 then_lft+2 else_lftend,_rgt= case when_rgt>= 14 then_rgt+2 else_rgtend where (_lft>= 14 or_rgt>= 14))

Preconditions

Please provide as detailed information about your environment as possible.

1. Running on localhost with xampp
 2. Operating Sytem: Windows 10 pro
Help Wanted

Most helpful comment

Open your phpmyadmin in browser and find your bagisto database then try to run these two queries in db console

1. ALTER TABLE categories CONVERT TO CHARACTER SET utf8;
2. ALTER TABLE category_translations  CONVERT TO CHARACTER SET utf8;

All 5 comments

Did u try to change the collations type for the table so they have the same.
https://stackoverflow.com/questions/1241856/illegal-mix-of-collations-error-in-mysql

Open your phpmyadmin in browser and find your bagisto database then try to run these two queries in db console

1. ALTER TABLE categories CONVERT TO CHARACTER SET utf8;
2. ALTER TABLE category_translations  CONVERT TO CHARACTER SET utf8;

works for me @shivam-webkul thanks

I followed instruction you posted @shivam-webkul above but I got error When creating a category on xampp
SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('merostores'@'localhost') does not exist (SQL: update categories set _lft = case when _lft >= 14 then _lft+2 else _lft end, _rgt = case when _rgt >= 14 then _rgt+2 else _rgt end where (_lft >= 14 or _rgt >= 14))

Then you need to check the database credential after that try to run cmd,

Was this page helpful?
0 / 5 - 0 ratings

Related issues

farshadff picture farshadff  路  4Comments

john7851 picture john7851  路  3Comments

accountmine picture accountmine  路  7Comments

alkhachatryan picture alkhachatryan  路  7Comments

vaishaliwebkul picture vaishaliwebkul  路  3Comments