>> What are the steps required to reproduce the bug?
When modifying a content type or adding a new one, the page which renders the 'successfully added field' is unable to display. The field itself is still added.
>> What behavior were you expecting?
Not getting an error
>> What happened instead?
I received an Error:
Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'cid' at row 1: INSERT INTO {cache_block} (cid, serialized, created, expire, tags, checksum_invalidations, checksum_deletions, data) VALUES [...] in "core/themes/bartik/templates/page.html.twig" at line 173. in Twig_Template->displayWithErrorHandling() (line 291 of core/vendor/twig/twig/lib/Twig/Template.php).
Running current Drupal 8.x head (2014-03-24), Apache, MySQL, PHP 5.4, Ubuntu.
Comments
Comment #1
stefan lehmannI can confirm that this error occurs on a fresh clone / installation of today.
Windows 7, Apache 2.2.22, PHP 5.4.3, MySQL 5.5.24
Comment #2
stefan lehmannLooks like this is already fixed now. Can't replicate error anymore, after pulling in the latest changes.
Comment #3
taran2lStill seeing this.
Comment #4
danblack commentedNote VARCHARS can contain more than 255 characters - 65535 actually (as of MySQL 5.0.3 and MySQL 5.0.15 is specified in D7/D8 as the minimum despite its old age). Don't create VARCHAR fields grossly larger than needed as the Memory Engine, the one used for non-disk based sorts/groups by/joins etc, will convert these to CHAR fields of the maximum varchar size and so will use more memory and hence possibly push the result to disk depending on data size.
Looks like the comment #3 url is 428 bytes.
Comment #5
dawehnerThat is certainly a big problem.
I can reproduce when I add a translatable field.
Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'cid' at row 1: INSERT INTO {cache_render} (cid, serialized, created, expire, tags, checksum_invalidations, checksum_deletions, data) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => entity_view:block:seven_help:en:seven:http://www/d8/admin/config/regional/content-language?destination=admin%2Fstructure%2Ftypes%2Fmanage%2Ftype2%2Ffields%2Fnode.type2.field_test%2Ffield%3Fdestinations%5B0%5D%5Broute_name%5D%3Dfield_ui.instance_edit_node%26destinations%5B0%5D%5Broute_parameters%5D%5Bnode_type%5D%3Dtype2%26destinations%5B0%5D%5Broute_parameters%5D%5Bfield_instance_config%5D%3Dnode.type2.field_test%26destinations%5B1%5D%3Dadmin%2Fstructure%2Ftypes%2Fmanage%2Ftype2%2Ffields [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => 1397944177 [:db_insert_placeholder_3] => -1 [:db_insert_placeholder_4] => content:1 block_view:1 block:seven_help theme:seven block_plugin:system_help_block [:db_insert_placeholder_5] => 18 [:db_insert_placeholder_6] => 3 [:db_insert_placeholder_7] => a:2:{s:7:"#markup";s:400:"<div class="block block-system" id="block-seven-help" role="complementary"> <div class="content"> Change language settings for <em>content types</em>, <em>taxonomy vocabularies</em>, <em>user profiles</em>, or any other supported element on your site. By default, language settings hide the language selector and the language is the site's default language. </div> </div> ";s:6:"#cache";a:1:{s:4:"tags";a:5:{s:7:"content";b:1;s:10:"block_view";b:1;s:5:"block";a:1:{s:10:"seven_help";s:10:"seven_help";}s:5:"theme";s:5:"seven";s:12:"block_plugin";a:1:{s:17:"system_help_block";s:17:"system_help_block";}}}} ) ") in "core/themes/seven/templates/page.html.twig" at line 93. in Twig_Template->displayWithErrorHandling() (line 291 of core/vendor/twig/twig/lib/Twig/Template.php).Comment #6
danblack commentedThis is a duplicate of #2224847: Automatically shorten cid's in Cache\DatabaseBackend and PhpBackend which has a patch.
Comment #7
dawehnerAh great. thank you!
Comment #8
danblack commentedThough I've raised the limit to 1024, there isn't a real limit now apart from making sure database driver implementations are using the right type underneath. If you can measure a use of the cache that indicates this should be higher its better to know now before the patch committed.