Error bei mehreren Seite
Closed this issue · 6 comments
Bug description
Wenn ich Eine Umfrage mit mehreren Seiten anlege bekomme ich, wenn ich auf weiter klicke, eine Fehlermeldung.
Bei einseitigen umfragen geht es.
Contao 4.13 / PHP 8
Log
[2022-09-30T12:09:17.861948+02:00] request.INFO: Matched route "tl_page.58". {"route":"tl_page.58","route_parameters":{"_token_check":true,"_controller":"Contao\FrontendIndex::renderPage","_scope":"frontend","_locale":"de","_format":"html","_canonical_route":"tl_page.58","parameters":"","pageModel":{"Contao\PageModel":[]},"_route":"tl_page.58","_route_object":{"Contao\CoreBundle\Routing\Page\PageRoute":[]}},"request_uri":"http://senmuenchen2020.alfahosting.org/umfrage.html","method":"POST"} []
[2022-09-30T12:09:17.894458+02:00] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2022-09-30T12:09:18.051692+02:00] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\NotNullConstraintViolationException: "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null" at /var/www/web28943384/html/contao413/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php line 114 {"exception":"[object] (Doctrine\DBAL\Exception\NotNullConstraintViolationException(code: 1048): An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null at /var/www/web28943384/html/contao413/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:114)\n[previous exception] [object] (Doctrine\DBAL\Driver\PDO\Exception(code: 1048): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null at /var/www/web28943384/html/contao413/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28)\n[previous exception] [object] (PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null at /var/www/web28943384/html/contao413/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:134)"} []
Die Ursache ist in src/Resources/contao/elements/ContentSurvey.php Zeile 215 zu finden. Diese könnte durch
$uid = 0;
if ($this->User != null && $this->User->id != null) {
$uid = $this->User->id;
}
$this->insertNavigation($this->objSurvey->id, $this->pin, $uid, $previouspage, $page);
ersetzt werden.
Danke das hat geholfen - ist aber noch nicht in der aktuellen Version 3.4 drin.
Please test branch fix_multiple_pages
hallo,
der bugfix hat es aber noch nicht in 3.4.1 geschafft, nicht war?
habt ihr dafür pläne?
viele grüße
karsten
Wann wird der Fix veröffentlicht?
Fixed in 3.4.2.