terminal42 / contao-notification_center

The most popular notification configuration extension for the Contao Open Source CMS!
63 stars 38 forks source link

Internal Server Error beim Kopieren von Benachrichtigungen #318

Closed RWesemann closed 5 months ago

RWesemann commented 6 months ago

Wenn ich eine Benachrichtigung im Notification-Center kopiere, erscheint folgende Exception. Die Ursprungs-Benachrichtigung hat tadellos funktioniert. Es wird auch eine Kopie erstellt, in der Tabelle aber wird sie ausgegraut angezeigt und sie enthält keine Inhalte (Nachrichten).

Stack-Trace:

An exception occurred while executing a query: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column `d038b958`.`tl_nc_message`.`published` at row 1

  at vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:117
  at Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(object(Exception), object(Query))
     (vendor/doctrine/dbal/src/Connection.php:1943)
  at Doctrine\DBAL\Connection->handleDriverException(object(Exception), object(Query))
     (vendor/doctrine/dbal/src/Connection.php:1885)
  at Doctrine\DBAL\Connection->convertExceptionDuringQuery(object(Exception), 'INSERT INTO tl_nc_message (`pid`, `tstamp`, `title`, `gateway`, `email_priority`, `email_template`, `published`, `stop`, `start`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)', array('8', 1710446662, 'Ameldeformular', 1, 3, 'mail_default', false, '', ''), array())
     (vendor/doctrine/dbal/src/Connection.php:1106)
  at Doctrine\DBAL\Connection->executeQuery('INSERT INTO tl_nc_message (`pid`, `tstamp`, `title`, `gateway`, `email_priority`, `email_template`, `published`, `stop`, `start`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)', array('8', 1710446662, 'Ameldeformular', 1, 3, 'mail_default', false, '', ''), array())
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:279)
  at Contao\Database\Statement->query('', array('8', 1710446662, 'Ameldeformular', 1, 3, 'mail_default', false, '', ''))
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:235)
  at Contao\Database\Statement->execute()
     (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:1096)
  at Contao\DC_Table->copyChilds('tl_nc_notification', '8', '2', '8')
     (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:947)
  at Contao\DC_Table->copy()
     (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:667)
  at Contao\Backend->getBackendModule('nc_notifications', null)
     (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:168)
  at Contao\BackendMain->run()
     (vendor/contao/core-bundle/src/Controller/BackendController.php:49)
  at Contao\CoreBundle\Controller\BackendController->mainAction()
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:44)
aschempp commented 5 months ago

This looks like a bug in the Contao core. I think @ausi or @m-vo did implement the boolean handling?

fritzmg commented 5 months ago

I noticed the same issue today in a different context. We need to backport this to Contao 4.13: https://github.com/contao/contao/blob/110d32fd52f5abfb58a07d15813d09dda7292e8e/core-bundle/contao/library/Contao/Database/Statement.php#L243-L248

However, I am not entirely certain that this won't break anything.

I think @ausi or @m-vo did implement the boolean handling?

@fritzmg et al. ;)

aschempp commented 5 months ago

Closing this here then, since it needs to be fixed in Contao. @fritzmg would you open an issue or PR for it?

fritzmg commented 4 months ago

https://github.com/contao/contao/pull/7126