Unable to install AwoCoupon on Joomla 5.4.0


  • Default avatar
    webmastergreg    
     10 hours ago
    0

    Hi,
    When I try to install AwoCoupon 4.0.1.6 on Joomla 5.4.0, I get this error :
    Specified key was too long; max key length is 1000 bytes
    component: installation error

    Thanks in advance
    Regards
  • Default avatar
    webmastergreg    
     10 hours ago
    0

    Error spotted :
    CREATE TABLE IF NOT EXISTS #__awocoupon (
        ...
        `coupon_code` varchar(255) BINARY NOT NULL default '',
        ...
        KEY coupon_code (coupon_code)
    );

    The problem arises because in MySQL with utf8mb4 encoding (which is the default encoding in Joomla 5.4.0), each character can take up to 4 bytes. Therefore, a VARCHAR(255) can potentially require 1020 bytes (255 * 4 = 1020), which exceeds the 1000-byte limit for an index.

    So to resolve this issue, probably

    Modify the length of the coupon_code column to reduce its size (for example, VARCHAR(191), which will result in a maximum index size of 764 bytes with utf8mb4)

    Or create a partial index on the column ?

  • Default avatar
    webmastergreg    
     10 hours ago
    0

    Applied the same fix for all of those too :
    1. #__awocoupon_history.user_email
    2. #__awocoupon_tag.tag
    3. #__awocoupon_config.name
    4. #__awocoupon_giftcert_code.code et estore
    5. #__awocoupon_voucher_customer_code.code
    Did the trick, I was able to install it.

    But I'm waiting for your official correction.

  • Default avatar
    webmastergreg    
     9 hours ago
    0

    And I get an error when I want to activate my licence :
    error2
    An error occurred while activating the license
  • Your avatar
    seyi    
     8 hours ago
    0

    Hello,

    You must be using an old mysql version.  This would have been the easiest solution:

    Just had a look at your account and your subscription is already activate.  You can go here:
    Deactivate it for the current website, then activate it again through Joomla > awocoupon.
  • Default avatar
    webmastergreg    
     5 hours ago
    0

    Hi,

    Activation is now successful, thank you. (I'm on a test website, in the same domain as the production one)

    My server is with MariaDB 10.6.22 (Release date: 8 May 2025) a current long-term series of MariaDB.

    For the bug, your component use MyISAM, but it would be nice to use InnoDB.

    The InnoDB engine does not have this fixed 1000-byte limit.
    Since MariaDB 10.2.2 and especially 10.4+, it supports indexes up to 3072 bytes (including utf8mb4)
    As utf8mb4_unicode_ci is the default joomla, we shouldn't have to change that to fix this.

    Regards