lcache / wp-lcache

A WordPress implementation of LCache
https://wordpress.org/plugins/wp-lcache/
GNU General Public License v2.0
88 stars 5 forks source link

Fatal error: Uncaught PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘address’ at row 1 #114

Closed danielbachhuber closed 7 years ago

danielbachhuber commented 7 years ago
Fatal error: Uncaught PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘address’ at row 1 in /srv/bindings/e39874a9dbab0539/code/wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/DatabaseL2.php:242 Stack trace: #0 /srv/bindings/e39874a9dbab0539/code/wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/DatabaseL2.php(242): PDOStatement->execute() #1 /srv/bindings/e39874a9dbab0539/code/wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/Integrated.php(56): LCache\DatabaseL2->set(‘10.223.192.153:…’, Object(LCache\Address), ‘s:25851:”a:12:{…’, 1486928148, Array) #2 /srv/bindings/e39874a9dbab0539/code/wp-content/plugins/wp-lcache/object-cache.php(1001): LCache\Integrated->set(Object(LCache\Address), ‘a:12:{i:0;O:8:”…’, 300) #3 /srv/bindings/e39874a9dbab0539/code/wp-content/plugins/wp-lcache/object-cache.php(710): WP_Object_Cache->call_lcache(‘set’, Array, ‘a:12:{i:0;O:8:”…’, 300) #4 /srv/bind in /srv/bindings/e39874a9dbab0539/code/wp-content/plugins/wp-lcache/vendor/lcache/lcache/src/DatabaseL2.php on line 242

Problem: address column is too short for the data being inserted.

From https://wordpress.org/support/topic/error-with-formidable-forms/

davidstrauss commented 7 years ago

We had a similar issue with Drupal. I didn't want to impost semantics on key shortening within LCache (necessarily), so we shortened it in the Drupal implementation using the same method as Drupal's own DB-backed caches.

stevector commented 7 years ago

Here's the PR for the Drupal 8 module: https://github.com/lcache/drupal-8/pull/17/files

frankiejarrett commented 7 years ago

@danielbachhuber I can take a stab at this one unless you already have something in the works?

danielbachhuber commented 7 years ago

@fjarrett Go ahead!