Fatal Error 1406 Data too long for column 'details' at row1


  • Default avatar
    stefan7    
     6 months ago
    0

    On pressing the Buy Now button in cart an error occurs and throws a Fatal Error:
    1406 Data too long for column 'details' at row1

    Orders are created but have no customer and other data.
    Going into the order in orders list throws a fatal since some data is missing:
    0 Attempt to assign property "invoiceNumbers" on null

    Orders without coupon work without errors.

    After migration from Joomla 3.10.12, VM 3.8.6.

    Joomla 4.4.4
    VirtueMart 4.2.12
    PHP 8.1

    I found the column 'details' in
    #__awocoupon_history - text
    #__awocoupon_history_tmp - mediumtext

    I changed medimtext to text and saved all coupons, but no change.

    Kollation for the columns is utf8mb3_general_ci.
    I wonder if that should not be utf8mb4_general_ci.

    I am still trying to find the issue and report back if I find the problem.

    StefanSTS
  • Default avatar
    stefan7    
     6 months ago
    0

    Actually type text seemed to be too small. Other orders had like 32000 characters in details.
    I changed the type in both tables to mediumtext. _history_tmp had that, but not _history.

    I suggest removing some information stored in details.
    Those products have lots of custom fields. I guess, just storing the custom field IDs would suffice, if that is at all needed.

    STS
  • Default avatar
    stefan7    
     6 months ago
    0

    From my point of view it would be good to have a switch keep all those information out of details.
    Cart sum and applied coupon is totally sufficient, the rest is already stored by VM in the orders table.
    It's just filling the db with redundant data.

    STS
  • Your avatar
    seyi    
     5 months ago
    0

    Hello,

    You can go to awocoupon > configuration > trigggers, and set a value for "Delete coupon history detail x days after entry"