Top Exits not working, table serendipity_exits not created
Posted: Sun Feb 22, 2015 5:46 pm
Since long the Top Exits plugin didn't display anything for me but I wasn't bothered enough to investigate why. Actually I hoped that it would magically work after an upgrade to 2.0 but it didn't. So today I sat down and dug into, and the cause is that the serendipity_exits table was never created in the MySQL database. Taking the structure from sql/db.sql I tried to create the table but got only the famous error. Yeah.. it was mentioned here already several times, and the underlying cause is that in an UTF-8 key 3 bytes are reserved per character, which for host(128)+path(255)+day(8)+entry_id(11) results in 3*(128+255)+8+11 = 1168.
That's 168/3=56 too many characters. Splitting that up into weighed host and path I used host=128-1*18=110 and path=255-2*18-2=217 which gives a key length of 3*(110+217)+8+11 = 1000.
I created the table with these new values and the corresponding index and voila, Top Exits works.
This should be fixed in the next release.
Code: Select all
Specified key was too long; max key length is 1000 bytes
That's 168/3=56 too many characters. Splitting that up into weighed host and path I used host=128-1*18=110 and path=255-2*18-2=217 which gives a key length of 3*(110+217)+8+11 = 1000.
I created the table with these new values and the corresponding index and voila, Top Exits works.
This should be fixed in the next release.