Recent Topics

General error: 1267 Illegal mix of collations



  • I want to add categories and I have this error?

    SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='
    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)



  • Hi there,
    Please change your database collation with utf8mb4_unicode_ci



  • @sanjay-webkul said in General error: 1267 Illegal mix of collations:

    de_ci

    I have in the database utf8mb4_unicode_ci



  • Which version of Bagisto are you using?



  • bagisto: 1.4.5
    addons: livestream , marketplace vendor
    php:8.1



  • ok, problem

    problem solved

    i have next one it is in marketplace

    when i go to the dealer

    Attempt to read property "id" on null (View: /var/www/html/bagisto/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/categories.blade.php) (View: /var/www/html/bagisto/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/categories.blade.php)



  • hi,

    I install new bagisto , only shop , a have same problem

    SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='

    update
    categories
    set
    _lft = case
    when _lft between 0 and 0 then _lft + 1
    when _lft between 0 and 1 then _lft -1
    else _lft
    end,
    _rgt = case
    when _rgt between 0 and 0 then _rgt + 1
    when _rgt between 0 and 1 then _rgt -1
    else _rgt
    end
    where
    (
    _lft between 0 and 1
    or _rgt between 0 and 1
    )



  • works as I changed to

    utf8mb4_general_ci;


Log in to reply