Closed surtic86 closed 5 years ago
Sorry! But I can't reconstruct this error. Is there anybody out there with the same issue?
DePeder23 had the same Problem and looks like it was also there in Contact with you. https://community.contao.org/de/showthread.php?22634-gallery_creator/page21&styleid=9
The thing is that wen we Create a new Album there can't be already a Thumb so the Column should allow to be Null.
I have changed this Manually on the DB. Can it be that there was a DB Migration Issue? Should the Column thumb allow Null or not?
Ich verstehe nicht, wieso es zum Fehler kommt.
'sql' => "int(10) unsigned NOT NULL default '0'",
Der Default Wert ist doch '0'.
Liege ich irgendwie falsch?
Leider weiss ich nicht mehr wie die Definition bei mir auf der DB war da ich es nun von hand angepasst habe, dass NULL erlaubt ist.
Eventuell gibt es ja verschiedene MySQL Einstellungen wo 0 === NULL ist und somit dein Default Wert nicht erlaubt wird.
Aber so oder so macht es für mich irgend wie keinen Sin, dass du einen Default Wert 0 erlaubst der keine Verbindung hat aber NULL nicht.
Leider weiss ich nicht mehr wie die Definition bei mir auf der DB war da ich es nun von hand angepasst habe, dass NULL erlaubt ist.
Eventuell gibt es ja verschiedene MySQL Einstellungen wo 0 === NULL ist und somit dein Default Wert nicht erlaubt wird.
Aber so oder so macht es für mich irgend wie keinen Sin, dass du einen Default Wert 0 erlaubst der keine Verbindung hat aber NULL nicht.
Aber das ist eigentlich der selbe Fall wie in der Callendar Erweiterung des Codes. Guck mal hier:
Oder nicht?
Hy, I have the very same problem:
After installing gallery-creator-bundle 1.2.2 on a fresh and clean contao 4.7.6 installation, I get this "An exception occurred while executing 'UPDATE tl_gallery_creator_albums SET thumb
=NULL WHERE id
='2'': SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'thumb' cannot be null" error. I also can reproduce this on a my longer running main site under contao 4.7.5.
Any ideas? Is this a bug? Is there any work around?
Hi darthmax78 Would you post the error log?
Thank you for the quick response!
from var/logs:
[2019-06-30` 15:15:10] request.INFO: Matched route "contao_backend". {"route":"contao_backend","route_parameters":{"_route":"contao_backend","_scope":"backend","_token_check":true,"_controller":"Contao\\CoreBundle\\Controller\\BackendController::mainAction"},"request_uri":"https://www.opti-net.at/contao?act=edit&do=gallery_creator&id=1&mode=2&pid=0&ref=jZrlua1Z&rt=wH3nPkTzBmGqQoAyMIYG7aVoMzwEQSlJG2pR8ZDZiqs","method":"POST"} []
[2019-06-30 15:15:10] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\NotNullConstraintViolationException: "An exception occurred while executing 'UPDATE tl_gallery_creator_albums SET `thumb`=NULL WHERE `id`='1'': SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'thumb' cannot be null" at /var/Webserver/Produktiv/Webspace/www.opti-net.at/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 123 {"exception":"[object] (Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException(code: 0): An exception occurred while executing 'UPDATE tl_gallery_creator_albums SET `thumb`=NULL WHERE `id`='1'':\n\nSQLSTATE[23000]: Integrity constraint violation: 1048 Column 'thumb' cannot be null at /var/Webserver/Produktiv/Webspace/www.opti-net.at/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:123, Doctrine\\DBAL\\Driver\\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'thumb' cannot be null at /var/Webserver/Produktiv/Webspace/www.opti-net.at/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:109, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'thumb' cannot be null at /var/Webserver/Produktiv/Webspace/www.opti-net.at/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:107)"} []
Could you describe exactly when teh error occurs? Backend/Frontend?
Sorry if I was a bit unprecise:
First I install the gallery-creatore-bundle into the site via composer require on the bash. Then I update the database via install tool and afterwards clean & warmup the cache of the site. Final I login the backend and tried to create the first gallery. But when I try to change the sort order of the pictures or save the new gallery, there came the error. I've tried it with a brand new clean site under 4.7.6 (also total the same timeline) and it crashes during creating the gallery in the same way.
Could you activate the debug mode in the contao manager and send me (m.cupic@gmx.ch) the credentials for:
Of course - thank you very much for the quick and uncomplicated support!
Fixed in 1bd06d9e083320bf1a07387e3938f43d6fbd8b27
Perfect!!! Thanks for your outstandig quick response!!
Hello there,
I can't create new Albums since i Upgraded Contao and Gallery Creator. It should not set any Thumb on Album creation because you can't choose any at this Point.
Thanks for your Help.
An exception occurred while executing 'UPDATE tl_gallery_creator_albums SET
thumb=NULL WHERE
id='161'': SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'thumb' cannot be null
Versions: