Open volomike opened 4 years ago
Nope. I tried the above and it almost worked. I get stuck trying to create a new field on a collection. Same error -- the 787 bytes on the index issue. You see that error when going to Javascript console. I tried thinking up a fix but nothing worked.
On v8.8.1 of Directus, on many shared hosting plans, some of their older servers have an older MySQL version that doesn't like the
idx_user_collection_tree
index on thedirectus_collection_presets
table. It errors out on the install because it has a max index size of like 787 bytes I think I saw? Other users may encounter this same problem on any host with an older version of MySQL or MariaDB.The fix:
I had to install a duplicate system on my local workstation with everything named the same as it would have been on the server, and then login at least once into the admin system. On the naming, that included exact database names and exact database user names.
I then copied up all the files to the hosting plan server, including the custom ones in the config folder.
From there, on my local server, using phpMyAdmin, I removed the index
idx_user_collection_tree
fromdirectus_collection_presets
. Then, I changed the collation on thedirectus_collection_presets.title
toutf8_general_ci
instead of the heavierutf8mb4_general_ci
. Yeah, I might have troubles with some international UTF-8 characters (like for China), but it will work for most English and European languages, and perhaps a few others. Next, recreate theidx_user_collection_tree
unique index on those 3 columns and you won't get the index size issue. I then did a database export from my local server and then imported into the new server.Last, just edit the config/{your-site-name}.php file and ensure pathing is correct between the differences of your local web server and the remote shared hosting web server.
At that point, I could login on the admin system of the new server and all was well.