Automattic / developer

In your WordPress, developing locally
http://vip.wordpress.com
GNU General Public License v2.0
472 stars 103 forks source link

Transient names exceed maximum `option_name` length #51

Closed johnbillion closed 11 years ago

johnbillion commented 11 years ago

The transient name a8c_developer_plugin_details_{plugin} causes the option_name in the options table to exceed the maximum length when the transient timeout is stored.

screen shot 2013-08-16 at 10 16 28

Related ticket on core Trac: http://core.trac.wordpress.org/ticket/13310

joshbetz commented 11 years ago

So, recapping from that ticket: option_name is VARCHAR(64) and a schema change to fix that seems unlikely.

With 19 characters for _transient_timeout_, we actually can only have 45 character option names. An easy fix for this case would be to reduce a8c_developer_plugin_details_ to a8c_developer_details_. We could also look at concatenating the plugin slug if necessary, but that seems dangerous since there are some related plugins included that could end up with the same slugs.

johnbillion commented 11 years ago

a8c_dev_details would also work as an even shorter prefix. That's 13 characters shorter than the current one.

tillkruss commented 11 years ago

The truncated transient name is causing other plugins to throw undefined index notices.