Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught mysqli_sql_exception: Data too long for column 'message' #27

Open
medarob opened this issue Oct 7, 2024 · 2 comments
Open

Comments

@medarob
Copy link

medarob commented Oct 7, 2024

Fatal error: Uncaught mysqli_sql_exception: Data too long for column 'message' at row 1 in /var/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:164

Stack trace:
#0 /var/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php(164): mysqli_stmt->execute()
#1 /var/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1527): Doctrine\DBAL\Driver\Mysqli\MysqliStatement->execute() #2 /var/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(926): Doctrine\DBAL\Connection->executeStatement('INSERT INTO `tx...', Array, Array)
#3 /var/www/test/public/typo3/sysext/core/Classes/Database/Connection.php(215): Doctrine\DBAL\Connection->insert('`tx_errorlog_do...', Array, Array)
#4 /var/www/test/public/typo3conf/ext/error_log/Classes/Service/LogWriter.php(195): TYPO3\CMS\Core\Database\Connection->insert('tx_errorlog_dom...', Array)
#5 /var/www/test/public/typo3conf/ext/error_log/Classes/Service/LogWriter.php(110): RD\ErrorLog\Service\LogWriter->write(Array)
#6 /var/www/test/public/typo3conf/ext/error_log/Classes/Handler/DebugExceptionHandler.php(28): RD\ErrorLog\Service\LogWriter->writeError(Object(Doctrine\DBAL\Exception\DriverException), 'WEB')
#7 /var/www/test/public/typo3conf/ext/error_log/Classes/Handler/DebugExceptionHandler.php(15): RD\ErrorLog\Handler\DebugExceptionHandler->writeMessage(Object(Doctrine\DBAL\Exception\DriverException), 'WEB')
#8 /var/www/test/public/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php(72): RD\ErrorLog\Handler\DebugExceptionHandler->echoExceptionWeb(Object(Doctrine\DBAL\Exception\DriverException))
#9 [internal function]: TYPO3\CMS\Core\Error\AbstractExceptionHandler->handleException(Object(Doctrine\DBAL\Exception\DriverException))
#10 {main} Next Doctrine\DBAL\Driver\Mysqli\Exception\StatementError: Data too long for column 'message' at row 1 in /var/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Exception/StatementError.php:29

Stack trace:
#0 /var/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php(166): Doctrine\DBAL\Driver\Mysqli\Exception\StatementError::upcast(Object(mysqli_sql_exception))
#1 /var/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1527): Doctrine\DBAL\Driver\Mysqli\MysqliStatement->execute()
#2 /var/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(926): Doctrine\DBAL\Connection->executeStatement('INSERT INTO `tx...', Array, Array)
#3 /var/www/test/public/typo3/sysext/core/Classes/Database/Connection.php(215): Doctrine\DBAL\Connection->insert('`tx_errorlog_do...', Array, Array)
#4 /var/www/test/public/typo3conf/ext/error_log/Classes/Service/LogWriter.php(195): TYPO3\CMS\Core\Database\Connection->insert('tx_errorlog_dom...', Array)
#5 /var/www/test/public/typo3conf/ext/error_log/Classes/Service/LogWriter.php(110): RD\ErrorLog\Service\LogWriter->write(Array)
#6 /var/www/test/public/typo3conf/ext/error_log/Classes/Handler/DebugExceptionHandler.php(28): RD\ErrorLog\Service\LogWriter->writeError(Object(Doctrine\DBAL\Exception\DriverException), 'WEB')
#7 /var/www/test/public/typo3conf/ext/error_log/Classes/Handler/DebugExceptionHandler.php(15): RD\ErrorLog\Handler\DebugExceptionHandler->writeMessage(Object(Doctrine\DBAL\Exception\DriverException), 'WEB')
#8 /var/www/test/public/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php(72): RD\ErrorLog\Handler\DebugExceptionHandler->echoExceptionWeb(Object(Doctrine\DBAL\Exception\DriverException))
#9 [internal function]: TYPO3\CMS\Core\Error\AbstractExceptionHandler->handleException(Object(Doctrine\DBAL\Exception\DriverException))
#10 {main} Next Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO `tx_errorlog_domain_model_error` (`data`, `page_uid`, `message`, `code`, `file`, `line`, `trace`, `browser_info`, `server_name`, `request_uri`, `root_page_uid`, `crdate`, `IP`, `user`, `user_id`, `workspace`, `event_dispatched`, `channel`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["", 2506, "An exception occurred while executing 'INSERT INTO `tx_errorlog_domain_model_error` (`data`, `page_uid`, `message`, `code`, `file`, `line`, `trace`, `browser_info`, `server_name`, `request_uri`, `root_page_uid`, `crdate`, `IP`, `user`, `user_id`, `workspace`, `event_dispatched`, `channel`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ....

and then there is a very long message with around 7.000.000 million characters :/

@medarob
Copy link
Author

medarob commented Oct 7, 2024

it seems what triggered this (and maybe #26) was an error in the fluid code.

Somehow I must accidentally hit the enter and space key and the code looked like this:

<f
                           :render partial="myPartial" arguments="{_all}" />

after changing it back to
<f:render partial="myPartial" arguments="{_all}" />
the error was gone.

Not sure if that is an issue? Maybe, maybe not? Coding errors can happen but depending on the message alone it wasn't clear what was wrong. I noticed the change in the editor.

Please close the issue if that is not an extension issue.

@Voronov
Copy link
Contributor

Voronov commented Oct 11, 2024

@medarob I'm going to add a check and limit the message size so it will fit in the database in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants