Gerade bekomme ich eine Fehlermeldung, bei dem Versuch einen ersten Blogkommentar einzutragen. Ich nutze ein Plugin für den Blog und habe über die Anleitung von Moritz hier das Emailfeld ausgeblendet und den Datenschutzhinweis mit Checkbox eingefügt. Ich verstehe die Fehlermeldung nicht ganz, vermute aber das Problem beim Emailfeld - scheint ein Pflichtfeld zu sein.
Kann jemand helfen:
An exception occurred while executing 'INSERT INTO s_blog_comments (blog_id, name, headline, comment, creation_date, active, email, points) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' with params [49, "test", " ", "test", "2018-04-20 17:06:53", 0, null, "10"]:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'email' cannot be null
2018-04-20T17:06:53.771378+0200
core
{
"uri": "/blog/rating/blogArticle/49",
"method": "POST",
"query": {
"module": "frontend",
"controller": "blog",
"action": "rating",
"blogArticle": "49"
},
"post": {
"name": "test",
"headline": " ",
"points": "10",
"comment": "test",
"first_name_confirmation": "",
"blog-checkbox": "1",
"Submit": "Speichern",
"__csrf_token": "jQFydFWARy0eR4Sk6HMcu0Z8MQZxwO"
}
}
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'email' cannot be null' in /var/www/vhosts/host.de/shop/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:168
Stack trace:
#0 /var/www/vhosts/host.de/shop/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(168): PDOStatement->execute(NULL)
#1 /var/www/vhosts/host.de/shop/engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(281): Doctrine\DBAL\Statement->execute()
#2 /var/www/vhosts/host.de/shop/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1014): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->executeInserts()
#3 /var/www/vhosts/host.de/shop/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(378): Doctrine\ORM\UnitOfWork->executeInserts(Object(Doctrine\ORM\Mapping\ClassMetadata))
#4 /var/www/vhosts/host.de/shop/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(356): Doctrine\ORM\UnitOfWork->commit(NULL)
#5 /var/www/vhosts/host.de/shop/engine/Shopware/Controllers/Frontend/Blog.php(555): Doctrine\ORM\EntityManager->flush()
#6 /var/www/vhosts/host.de/shop/engine/Shopware/Controllers/Frontend/Blog.php(453): Shopware_Controllers_Frontend_Blog->sSaveComment(Array, 49)
#7 /var/www/vhosts/host.de/shop/engine/Library/Enlight/Controller/Action.php(193): Shopware_Controllers_Frontend_Blog->ratingAction()
#8 /var/www/vhosts/host.de/shop/engine/Library/Enlight/Controller/Dispatcher/Default.php(549): Enlight_Controller_Action->dispatch('ratingAction')
#9 /var/www/vhosts/host.de/shop/engine/Library/Enlight/Controller/Front.php(222): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))
#10 /var/www/vhosts/host.de/shop/engine/Shopware/Kernel.php(215): Enlight_Controller_Front->dispatch()
#11 /var/www/vhosts/host.de/shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(486): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /var/www/vhosts/host.de/shop/engine/Shopware/Components/HttpCache/AppCache.php(268): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
#13 /var/www/vhosts/host.de/shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(253): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true)
#14 /var/www/vhosts/host.de/shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(270): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true)
#15 /var/www/vhosts/host.de/shop/engine/Shopware/Components/HttpCache/AppCache.php(143): Symfony\Component\HttpKernel\HttpCache\HttpCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true)
#16 /var/www/vhosts/host.de/shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(201): Shopware\Components\HttpCache\AppCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true)
#17 /var/www/vhosts/host.de/shop/engine/Shopware/Components/HttpCache/AppCache.php(116): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/vhosts/host.de/shop/shopware.php(122): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request))
#19 {main}
Next exception 'Doctrine\DBAL\DBALException' with message 'An exception occurred while executing 'INSERT INTO s_blog_comments (blog_id, name, headline, comment, creation_date, active, email, points) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' with params [49, "test", " ", "test", "2018-04-20 17:06:53", 0, null, "10"]:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'email' cannot be null' in /var/www/vhosts/host.de/shop/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:131
Stack trace:
#0 /var/www/vhosts/host.de/shop/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(178): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(PDOException), 'INSERT INTO s_...', Array)
#1 /var/www/vhosts/host.de/shop/engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(281): Doctrine\DBAL\Statement->execute()
#2 /var/www/vhosts/host.de/shop/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1014): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->executeInserts()
#3 /var/www/vhosts/host.de/shop/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(378): Doctrine\ORM\UnitOfWork->executeInserts(Object(Doctrine\ORM\Mapping\ClassMetadata))
#4 /var/www/vhosts/host.de/shop/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(356): Doctrine\ORM\UnitOfWork->commit(NULL)
#5 /var/www/vhosts/host.de/shop/engine/Shopware/Controllers/Frontend/Blog.php(555): Doctrine\ORM\EntityManager->flush()
#6 /var/www/vhosts/host.de/shop/engine/Shopware/Controllers/Frontend/Blog.php(453): Shopware_Controllers_Frontend_Blog->sSaveComment(Array, 49)
#7 /var/www/vhosts/host.de/shop/engine/Library/Enlight/Controller/Action.php(193): Shopware_Controllers_Frontend_Blog->ratingAction()
#8 /var/www/vhosts/host.de/shop/engine/Library/Enlight/Controller/Dispatcher/Default.php(549): Enlight_Controller_Action->dispatch('ratingAction')
#9 /var/www/vhosts/host.de/shop/engine/Library/Enlight/Controller/Front.php(222): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))
#10 /var/www/vhosts/host.de/shop/engine/Shopware/Kernel.php(215): Enlight_Controller_Front->dispatch()
#11 /var/www/vhosts/host.de/shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(486): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /var/www/vhosts/host.de/shop/engine/Shopware/Components/HttpCache/AppCache.php(268): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
#13 /var/www/vhosts/host.de/shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(253): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true)
#14 /var/www/vhosts/host.de/shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(270): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true)
#15 /var/www/vhosts/host.de/shop/engine/Shopware/Components/HttpCache/AppCache.php(143): Symfony\Component\HttpKernel\HttpCache\HttpCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true)
#16 /var/www/vhosts/host.de/shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(201): Shopware\Components\HttpCache\AppCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true)
#17 /var/www/vhosts/host.de/shop/engine/Shopware/Components/HttpCache/AppCache.php(116): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/vhosts/host.de/shop/shopware.php(122): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request))
#19 {main}
2018-04-20T17:06:53.811232+0200
core
{
"uri": "/blog/rating/blogArticle/49",
"method": "POST",
"query": {
"module": "frontend",
"controller": "blog",
"action": "rating",
"blogArticle": "49"
},
"post": {
"name": "test",
"headline": " ",
"points": "10",
"comment": "test",
"first_name_confirmation": "",
"blog-checkbox": "1",
"Submit": "Speichern",
"__csrf_token": "jQFydFWARy0eR4Sk6HMcu0Z8MQZxwO"
}
}
LG