Add new category throw error
-
SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION megaligh_admin.get_url_path_of_category does not exist (SQL: update
categories
setimage
= ?,categories
.updated_at
= 2021-02-08 14:15:11 whereid
= 97)mysql 8.0.22 charset is utf8mb4_unicode_ci,.
I change charset to utf8_unicode_ci, but get this error
-
Hi @Megalight
please follow the solution added here
https://github.com/bagisto/bagisto/issues/4175
https://github.com/bagisto/bagisto/issues/2562 -
change all collation of table and its fields of categories , category_filterable_attributes and category_translations to utf8_general_ci
because all the collation of the three tables are not the same that is why you get that error
-
Try this one.
Note:- Always take DB backup before changing in DB and making changes in setting/config or other in admin panel.Check function present in DB or Not
ORshow create FUNCTION get_url_path_of_category;
If not, execute sql manually .
*Actually it is present in DB when we export DB,but don't know why not executed during migration.
Then change collation for all tables and columns
Its work for me.
Hope its works for others.