When I try to edit Display Suite code field, I encounter following error (it happens also in 7.x-1.x-dev):

Additional uncaught exception thrown while handling exception.
Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT lid, location FROM {locales_source} WHERE source = :source AND context = :context AND textgroup = 'default'; Array ( [:source] => Edit [:context] => ) in _locale_parse_js_file() (line 1557 of C:\data\www\knihovna\includes\locale.inc).
Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) 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, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:248:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT lid, location FROM {locales_source} WHERE source = :source AND context = :context AND textgroup = 'default'; Array ( [:source] => Edit [:context] => ) ";s:9:"%function";s:23:"_locale_parse_js_file()";s:5:"%file";s:40:"C:\data\www\knihovna\includes\locale.inc";s:5:"%line";i:1557;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://knihovna.litomysl.cz/admin/structure/ds/fields/manage_custom/narozeni_a_umrti [:db_insert_placeholder_7] => http://knihovna.litomysl.cz/admin/structure/ds/fields [:db_insert_placeholder_8] => 158.194.138.202 [:db_insert_placeholder_9] => 1334586532 ) in dblog_watchdog() (line 157 of C:\data\www\knihovna\modules\dblog\dblog.module).

Fatal error: Exception thrown without a stack frame in Unknown on line 0

It worked before, so it might have to do something with my environment. Feel free to educate me. Thanks.

Comments

swentel’s picture

Status: Active » Closed (won't fix)

Well, the error says your mysql version has gone away, for reasons that I can't tell you from where I am. But this has nothing todo with Display Suite at all.

milos.kroulik’s picture

Thanks. But MySQL connection works in all other area of Drupal, which seems suspicious to me.

swentel’s picture

Status: Closed (won't fix) » Closed (cannot reproduce)

That's weird indeed, however, I have no clue how I could reproduce this. Maybe it depends on the data you're trying to add into the form, because, as I say, it works perfectly fine here for me and all of my colleagues. (resetting status, it reflects it better).

milos.kroulik’s picture

Status: Closed (cannot reproduce) » Active

Well, it doesn't depend on output, as I can't edit anything. I will try to do some research and get back, if there will be any findings.

swentel’s picture

There might be one thing and that is you upgraded from 7.x-1.x to 7.x-2.x. In that case, that's not possible at all.

swentel’s picture

In case you upgraded, the ds_fields table misses the 'ui_limit' column, that's why it fails.

swentel’s picture

Status: Active » Postponed (maintainer needs more info)
milos.kroulik’s picture

Status: Postponed (maintainer needs more info) » Active

No, the problem is same on 7.x-1.x. And you are probably right, that it doesn't have much in common with DS. Thanks.

milos.kroulik’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry

milos.kroulik’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

It is solved by setting max_allowed_packet=100M in my.ini on hosting.

rpmskret’s picture

I have encountered this error several times on different drupal sites recently. And again for a new one today. Thank you for this post and the solution which also works for my test server, XAMPP type on windows 7.
I set the max_allowed_packet=32M in my.ini. It had been at the default of 1M.

@swentel, compliments to you for your incredible activity level with ds, including the support attention shown here.

libruce’s picture

Thanks for the post.
It is solved by adding setting max_allowed_packet=100M in my.ini on hosting.

wOOge’s picture

I was getting a similar error when editing a custom code field. Turning off the Toolbar module worked for me.

joehudson’s picture

increasing max_allowed_packet to 8M worked for me. The issue occurred rfor adding a new content type right after installing Display Suite and Field Group modules.

dongtian’s picture

Thanks a lot.
After set the max_allowed_packet = 32M, I can access my site again on Wamp.

stongo’s picture

This fixed this issue for me, as well. But a word of warning, make max_allowed_packet the lowest size possible. setting it too high is asking for trouble :)