Yes, the problem is the database version and the database server's configuration.
The root cause of this issue is that in Joomla! 4.4 the maintainers increased the alias column length from 191 to 400 characters. This means that if you put it in an index it requires 1600 bytes instead of 764 bytes in UTF8MB4 which uses 4 bytes per character (1200 instead of 573 in plain old UTF8 which uses 3 bytes per character). This is a problem because MySQL 5.7 has a default hard limit of 767 bytes for the InnoDB engine, and 1000 bytes for the MyISAM engine.
This change was thoughtlessly backported from Joomla! 5 which requires MySQL 8 or later. In MyQSL 8 the hard limit is higher for InnoDB, 3072 bytes if the DYNAMIC row format is used, this row format being the default for MySQL 8 anyway.
This could all have been avoided if the unique key definition had `alias`(100) instead of `alias`. That's database management 101, but I guess the Joomla! maintainers skipped class the day we were talking about index lengths. Well. You've hit a bug in Joomla! which won't be fixed because Joomla! 4.4 is in security maintenance mode and this is a functional, not security, issue.
As a side note, I can also tell that your MySQL 5.7 server does not support InnoDB which is actually required for Joomla! 4 and later. I can tell that because the restoration script noticed that and tried to use the MyISAM storage engine instead.
That said, there are things you –or, rather, the server administrator– can do.
If you can upgrade the server to MySQL 8 that would be the best idea, since it ensures you can upgrade to Joomla! 5 and beyond. Do note that MySQL 5.7 is already end of life since October 2023. So, upgrading is the sanest option from every perspective: future-proofing, performance, and security.
If upgrading to MySQL 8 is not an option at this time, you can ask the server administrator to enable the InnoDB engine on the MySQL 5.7server, and enable the innodb_large_prefix
option. This will work around this problem without causing any functional issues on your site, and without compromising its long term stability. The fact remains that MySQL 5.7 is End of Life and needs to be upgraded ASAP, but at least this workaround gives you a way to have a working site in the meantime.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!