rror when adding a new category in a subcategory. That is, when I create a category and select a "Parent Category"
-
@Shraddha
Please mention your bagisto version and attach the screenshot of the error you are getting. -
-
@Shraddha
Which database you are using and please mention the version of your database. -
@Jyoti said in rror when adding a new category in a subcategory. That is, when I create a category and select a "Parent Category":
Which database you are using and please mention the version of your database
PHP 7.4.1
Apache 2.4.41
MariaDB 10.4.11
Perl 5.16.3 -
@Jyoti
PHP 7.3.13
mysql Ver 15.1 -
This post is deleted! -
Hi @Shraddha
Check the collation type of each table, and make sure that they have the same collation.
After that check also the collation type of each table field that you have use in operation.
I had encountered the same error, and that tricks works on me.
You either need to add COLLATE to the WHERE clause,
or add it to the IN parameter definition,
or alter the field itself:
ALTER TABLE tableA CHARACTER SET utf8 COLLATE utf8_unicode_ci;
as the default collation for stored procedure parameters is utf8_general_ci and you can't mix collations.
Unless you need to sort data in Unicode order, I would suggest altering all your tables to use utf8_general_ci collation.
Thanks
-
@rahul
Thank you so much.it's done
-
This post is deleted! -
@rahul I made the collation same (tried both utf8mb4_unicode_ci and utf8mb4_general_ci) in the database.php file and at the phpmyadmin side but the issue persists
-
@Deepanjali
kindly once check all the possible solution provided
https://github.com/bagisto/bagisto/issues/2562 -
Try these queries:-
ALTER TABLE categories CONVERT TO CHARACTER SET utf8;
ALTER TABLE category_translations CONVERT to CHARACTER SET utf8;