Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Leslie Carson

    (@lunabug)

    What I have found is that the db table is not being created!!!

    It’s not added because it gets an error when adding the UNIQUE KEY. Error is: Specified key was too long; max key length is 767 bytes

    The field that is the problem is ‘rul_value’.

    Please let me know how to fix this.

    Thanks!

    I also experienced this problem. Based on my findings, it depends on what encoding you are using in your database. If you are using some form of UTF8, then each character appears to be 4 bytes.

    To resolve this for version 2.9.0, I changed the code in wplogin_redirect.php on line 1514 to the following (had to remove original backticks for comment):

    UNIQUE KEY rul_type (rul_type,rul_value(180))

    This only uses 180 of 255 characters for the rul_value column, and allowed me to install the plugin.

    Once the plugin is installed with this change made, updates should continue to work as normal since the tables will not need to be recreated. I am not sure what, if any, other effects this may have on plugin functionality, though.

    The following link has a better general explanation of the issue and the math involved as it relates to utf8mb4 and WordPress Core.

    https://make.www.ads-software.com/core/2015/04/02/the-utf8mb4-upgrade/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘****ERROR: Unknown error adding role-specific redirect for role contributor****’ is closed to new replies.