String data, right truncated: 1406 Data too long for column 'purpose'
Wenn ich manuell Cookie anlege, manchmal werden diese nicht angelegt. Im Backend ist keine Meldung, keine Info, nichts. Erst die Logs verraten das Phänomen:
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'purpose' at row 1Array
(
[query] => REPLACE INTO `cologne_de_cookies` SET `name` = :setv0, `origin` = :setv1, `purpose` = :setv2, `lifetime` = :setv3, `category` = :setv4
[prepare] => Array
(
[setv0] => Lorem Ipsum
[setv1] => www.google.de
[setv2] => Suspendisse faucibus, nunc et pellentesque egestas, lacus ante convallis tellus, vitae iaculis lacus elit id tortor. Nulla facilisi. Vivamus aliquet elit ac nisl. Suspendisse faucibus, nunc et pellentesque egestas, lacus ante convallis tellus, vitae iaculis lacus elit id tortor. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat nibh, nec pellentesque velit pede quis nunc.
[setv3] => 30 Minuten
[setv4] => marketing
)
)
#0 /var/www/html/cologne/packages/quiqqer/utils/src/QUI/Database/DB.php(663): QUI\Database\DB->exec()
#1 /var/www/html/cologne/packages/quiqqer/gdpr/src/QUI/GDPR/CookieManager.php(254): QUI\Database\DB->replace()
#2 /var/www/html/cologne/packages/quiqqer/gdpr/ajax/editCookie.php(17): QUI\GDPR\CookieManager::editManualCookie()
#3 /var/www/html/cologne/packages/quiqqer/quiqqer/lib/QUI/Ajax.php(367): {closure}()
#4 /var/www/html/cologne/packages/quiqqer/quiqqer/lib/QUI/Ajax.php(226): QUI\Ajax->callRequestFunction()
#5 /var/www/html/cologne/packages/quiqqer/quiqqer/lib/ajax.php(106): QUI\Ajax->call()
#6 /var/www/html/cologne/packages/quiqqer/quiqqer/admin/ajax.php(21): require('/var/www/html/c...')
#7 {main}
{
"request": "http:\/\/cologne.michael.pcsg\/admin\/ajax.php",
"errorFilename": false,
"userId": 528426858,
"username": "admin",
"IP": "127.0.0.1"
}
- Max Länge auf die Inputs setzen.
- Popup nicht schließen, sondern offen lassen, sodass man die Daten korrigieren kann.