AmazeeLabs / silverback-mono

Silverback Monorepo. Central hub for our open source packages and tooling.
https://silverback.netlify.app
8 stars 7 forks source link

External Preview: `DatabaseExceptionWrapper` Data too long #1083

Open Leksat opened 2 years ago

Leksat commented 2 years ago

A fatal error happens on Drupal nodes having too long path aliases.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1: INSERT INTO "key_value_expire" ("name", "collection", "value", "expire") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 1:/too-long-path-alias-goes-here [:db_insert_placeholder_1] => tempstore.private.silverback_external_preview [:db_insert_placeholder_2] => O:8:"stdClass":3:{s:5:"owner";s:1:"1";s:4:"data";O:15:"Drupal\Core\Url":12:{s:15:"*urlGenerator";N;s:15:"*urlAssembler";N;s:16:"*accessManager";N;s:12:"*routeName";N;s:18:"*routeParameters";a:0:{}s:10:"*options";a:3:{s:8:"language";O:29:"Drupal\Core\Language\Language":5:{s:7:"*name";s:7:"Deutsch";s:5:"*id";s:2:"de";s:12:"*direction";s:3:"ltr";s:9:"*weight";i:1;s:9:"*locked";b:0;}s:17:"external_url_type";s:7:"preview";s:8:"external";b:1;}s:11:"*external";b:1;s:11:"*unrouted";b:1;s:6:"*uri";s:174:"https://some-domain.com/too-long-path-alias-goes-here";s:15:"*internalPath";N;s:14:"*_serviceIds";a:0:{}s:18:"*_entityStorages";a:0:{}}s:7:"updated";i:1655211355;} [:db_insert_placeholder_3] => 1655816155 ) in Drupal\Core\KeyValueStore\DatabaseStorageExpirable->doSetWithExpire() (line 114 of core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php).

The actual URL path is replaced with /too-long-path-alias-goes-here and the domain is replaced with some-domain.com.

Leksat commented 2 years ago

@nbaosullivan here is the issue for the silverback_external_preview bug I discovered recently. /cc @pmelab @colorfield