SQL Index too Long

You will see an error similar to this:

Specified Key Was Too Long; Max Key Length Is 1000 Bytes

There is a problem that affects a minority of users when installing an extension with this error. This is because of a MySQL bug – a quick search on Google shows the issue.

You will need to revise the SQL file to resolve the issue:

  1. Disable the extension temporarily to prevent your site from experiencing any more issues in the mean time
  2. If the the complaint is about the unique keys, go to your SQL install script in app/code/community/Webshopapps/Productmatrix/sql/productmatrix_setup (using Product Matrix as example) and open the latest version into a text editor
  3. Find the line declaring UNIQUE KEY and remove this line. On the PRIMARY KEY line above, delete the last comma “,” and save
  4. Upload this over existing install script
  5. Clear your cache and keep extension disabled
  6. Refresh the front end
  7. If no errors are picked up you are resolved

If this does not fix the issue disable the extension by renaming the relevant extension file from app/etc/modules, to e.g. Webshopapps_ProductMatrix.xml.orig refresh front end, rename and remove .orig and refresh again.

0 votes

Leave a Reply

Featuring WPMU Bloglist Widget by YD WordPress Developer