Closed internetztube closed 2 years ago
The error does not occur during installation but at runtime. I was able to replicate the error on several PostgreSQL databases.
PHP: 7.3.25 Database driver & version : PostgreSQL 10.14 Craft edition & version: Craft Pro 3.6.12
2021-04-28 19:48:07 [-][4336][qdk49ftp54r2i1mrlk04b5p6gp][info][yii\db\Command::query] INSERT INTO "source_message" ("category", "message") VALUES ('site', 'domain.com') RETURNING "id" 2021-04-28 19:48:07 [-][4336][qdk49ftp54r2i1mrlk04b5p6gp][profile begin][yii\db\Command::query] INSERT INTO "source_message" ("category", "message") VALUES ('site', 'domain.com') RETURNING "id" 2021-04-28 19:48:07 [-][4336][qdk49ftp54r2i1mrlk04b5p6gp][profile end][yii\db\Command::query] INSERT INTO "source_message" ("category", "message") VALUES ('site', 'domain.com') RETURNING "id" 2021-04-28 19:48:07 [-][4336][qdk49ftp54r2i1mrlk04b5p6gp][error][yii\db\IntegrityException] PDOException: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "dateCreated" violates not-null constraint DETAIL: Failing row contains (1, null, null, 0 , site, domain.com). in /path/to/project/src/vendor/yiisoft/yii2/db/Command.php:1299 Stack trace: #0 /path/to/project/src/vendor/yiisoft/yii2/db/Command.php(1299): PDOStatement->execute() #1 /path/to/project/src/vendor/yiisoft/yii2/db/Command.php(1165): yii\db\Command->internalExecute('INSERT INTO "so...') #2 /path/to/project/src/vendor/yiisoft/yii2/db/Command.php(421): yii\db\Command->queryInternal('fetch', NULL) #3 /path/to/project/src/vendor/yiisoft/yii2/db/pgsql/Schema.php(640): yii\db\Command->queryOne() #4 /path/to/project/src/vendor/yiisoft/yii2/db/ActiveRecord.php(600): yii\db\pgsql\Schema->insert('{{%source_messa...', Array) #5 /path/to/project/src/vendor/yiisoft/yii2/db/ActiveRecord.php(566): yii\db\ActiveRecord->insertInternal(NULL) #6 /path/to/project/src/vendor/yiisoft/yii2/db/BaseActiveRecord.php(678): yii\db\ActiveRecord->insert(true, NULL) #7 /path/to/project/src/vendor/mutation/translate/src/Translate.php(186): yii\db\BaseActiveRecord->save() #8 [internal function]: mutation\translate\Translate->mutation\translate\{closure}(Object(yii\i18n\MissingTranslationEvent)) #9 /path/to/project/src/vendor/yiisoft/yii2/base/Event.php(312): call_user_func(Object(Closure), Object(yii\i18n\MissingTranslationEvent)) #10 /path/to/project/src/vendor/yiisoft/yii2/base/Component.php(637): yii\base\Event::trigger('yii\\i18n\\Messag...', 'missingTranslat...', Object(yii\i18n\MissingTranslationEvent)) #11 /path/to/project/src/vendor/yiisoft/yii2/i18n/MessageSource.php(117): yii\base\Component->trigger('missingTranslat...', Object(yii\i18n\MissingTranslationEvent)) #12 /path/to/project/src/vendor/yiisoft/yii2/i18n/MessageSource.php(87): yii\i18n\MessageSource->translateMessage('site', 'domain.com', 'en') #13 /path/to/project/src/vendor/yiisoft/yii2/i18n/I18N.php(90): yii\i18n\MessageSource->translate('site', 'domain.com', 'en') #14 /path/to/project/src/vendor/craftcms/cms/src/i18n/I18N.php(343): yii\i18n\I18N->translate('site', 'domain.com', Array, 'en') #15 /path/to/project/src/vendor/yiisoft/yii2/BaseYii.php(538): craft\i18n\I18N->translate('site', 'domain.com', Array, 'en') #16 /path/to/project/src/vendor/craftcms/cms/src/web/twig/Extension.php(1463): yii\BaseYii::t('site', 'domain.com') #17 /path/to/project/src/vendor/twig/twig/src/ExtensionSet.php(329): craft\web\twig\Extension->getGlobals() #18 /path/to/project/src/vendor/twig/twig/src/Environment.php(928): Twig\ExtensionSet->getGlobals() #19 /path/to/project/src/vendor/twig/twig/src/Environment.php(948): Twig\Environment->getGlobals() #20 /path/to/project/src/vendor/twig/twig/src/Template.php(378): Twig\Environment->mergeGlobals(Array) #21 /path/to/project/src/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array) #22 /path/to/project/src/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array) #23 /path/to/project/src/vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array) #24 /path/to/project/src/vendor/craftcms/cms/src/web/View.php(390): Twig\Environment->render('', Array) #25 /path/to/project/src/vendor/craftcms/cms/src/web/View.php(451): craft\web\View->renderTemplate('', '[]') #26 /path/to/project/src/vendor/craftcms/cms/src/web/Controller.php(257): craft\web\View->renderPageTemplate('', '[]', '<span class="st...') #27 /path/to/project/src/vendor/craftcms/cms/src/controllers/TemplatesController.php(100): craft\web\Controller->renderTemplate('', Array) #28 [internal function]: craft\controllers\TemplatesController->actionRender('', Array) #29 /path/to/project/src/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #30 /path/to/project/src/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array) #31 /path/to/project/src/vendor/craftcms/cms/src/web/Controller.php(190): yii\base\Controller->runAction('render', Array) #32 /path/to/project/src/vendor/yiisoft/yii2/base/Module.php(534): craft\web\Controller->runAction('render', Array) #33 /path/to/project/src/vendor/craftcms/cms/src/web/Application.php(274): yii\base\Module->runAction('templates/rende...', Array) #34 /path/to/project/src/vendor/yiisoft/yii2/web/Application.php(104): craft\web\Application->runAction('templates/rende...', Array) #35 /path/to/project/src/vendor/craftcms/cms/src/web/Application.php(259): yii\web\Application->handleRequest(Object(craft\web\Request)) #36 /path/to/project/src/vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request)) #37 /path/to/project/src/web/index.php(21): yii\base\Application->run() #38 {main} Next yii\db\IntegrityException: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "dateCreated" violates not-null constraint DETAIL: Failing row contains (1, null, null, 0 , site, domain.com). The SQL being executed was: INSERT INTO "source_message" ("category", "message") VALUES ('site', 'domain.com') RETURNING "id" in /path/to/project/src/vendor/yiisoft/yii2/db/Schema.php:678 Stack trace: #0 /path/to/project/src/vendor/yiisoft/yii2/db/Command.php(1304): yii\db\Schema->convertException(Object(PDOException), 'INSERT INTO "so...') #1 /path/to/project/src/vendor/yiisoft/yii2/db/Command.php(1165): yii\db\Command->internalExecute('INSERT INTO "so...') #2 /path/to/project/src/vendor/yiisoft/yii2/db/Command.php(421): yii\db\Command->queryInternal('fetch', NULL) #3 /path/to/project/src/vendor/yiisoft/yii2/db/pgsql/Schema.php(640): yii\db\Command->queryOne() #4 /path/to/project/src/vendor/yiisoft/yii2/db/ActiveRecord.php(600): yii\db\pgsql\Schema->insert('{{%source_messa...', Array) #5 /path/to/project/src/vendor/yiisoft/yii2/db/ActiveRecord.php(566): yii\db\ActiveRecord->insertInternal(NULL) #6 /path/to/project/src/vendor/yiisoft/yii2/db/BaseActiveRecord.php(678): yii\db\ActiveRecord->insert(true, NULL) #7 /path/to/project/src/vendor/mutation/translate/src/Translate.php(186): yii\db\BaseActiveRecord->save() #8 [internal function]: mutation\translate\Translate->mutation\translate\{closure}(Object(yii\i18n\MissingTranslationEvent)) #9 /path/to/project/src/vendor/yiisoft/yii2/base/Event.php(312): call_user_func(Object(Closure), Object(yii\i18n\MissingTranslationEvent)) #10 /path/to/project/src/vendor/yiisoft/yii2/base/Component.php(637): yii\base\Event::trigger('yii\\i18n\\Messag...', 'missingTranslat...', Object(yii\i18n\MissingTranslationEvent)) #11 /path/to/project/src/vendor/yiisoft/yii2/i18n/MessageSource.php(117): yii\base\Component->trigger('missingTranslat...', Object(yii\i18n\MissingTranslationEvent)) #12 /path/to/project/src/vendor/yiisoft/yii2/i18n/MessageSource.php(87): yii\i18n\MessageSource->translateMessage('site', 'domain.com', 'en') #13 /path/to/project/src/vendor/yiisoft/yii2/i18n/I18N.php(90): yii\i18n\MessageSource->translate('site', 'domain.com', 'en') #14 /path/to/project/src/vendor/craftcms/cms/src/i18n/I18N.php(343): yii\i18n\I18N->translate('site', 'domain.com', Array, 'en') #15 /path/to/project/src/vendor/yiisoft/yii2/BaseYii.php(538): craft\i18n\I18N->translate('site', 'domain.com', Array, 'en') #16 /path/to/project/src/vendor/craftcms/cms/src/web/twig/Extension.php(1463): yii\BaseYii::t('site', 'domain.com') #17 /path/to/project/src/vendor/twig/twig/src/ExtensionSet.php(329): craft\web\twig\Extension->getGlobals() #18 /path/to/project/src/vendor/twig/twig/src/Environment.php(928): Twig\ExtensionSet->getGlobals() #19 /path/to/project/src/vendor/twig/twig/src/Environment.php(948): Twig\Environment->getGlobals() #20 /path/to/project/src/vendor/twig/twig/src/Template.php(378): Twig\Environment->mergeGlobals(Array) #21 /path/to/project/src/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array) #22 /path/to/project/src/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array) #23 /path/to/project/src/vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array) #24 /path/to/project/src/vendor/craftcms/cms/src/web/View.php(390): Twig\Environment->render('', Array) #25 /path/to/project/src/vendor/craftcms/cms/src/web/View.php(451): craft\web\View->renderTemplate('', '[]') #26 /path/to/project/src/vendor/craftcms/cms/src/web/Controller.php(257): craft\web\View->renderPageTemplate('', '[]', '<span class="st...') #27 /path/to/project/src/vendor/craftcms/cms/src/controllers/TemplatesController.php(100): craft\web\Controller->renderTemplate('', Array) #28 [internal function]: craft\controllers\TemplatesController->actionRender('', Array) #29 /path/to/project/src/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #30 /path/to/project/src/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array) #31 /path/to/project/src/vendor/craftcms/cms/src/web/Controller.php(190): yii\base\Controller->runAction('render', Array) #32 /path/to/project/src/vendor/yiisoft/yii2/base/Module.php(534): craft\web\Controller->runAction('render', Array) #33 /path/to/project/src/vendor/craftcms/cms/src/web/Application.php(274): yii\base\Module->runAction('templates/rende...', Array) #34 /path/to/project/src/vendor/yiisoft/yii2/web/Application.php(104): craft\web\Application->runAction('templates/rende...', Array) #35 /path/to/project/src/vendor/craftcms/cms/src/web/Application.php(259): yii\web\Application->handleRequest(Object(craft\web\Request)) #36 /path/to/project/src/vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request)) #37 /path/to/project/src/web/index.php(21): yii\base\Application->run() #38 {main} Additional Information: Array ( [0] => 23502 [1] => 7 [2] => ERROR: null value in column "dateCreated" violates not-null constraint DETAIL: Failing row contains (1, null, null, 0 , site, domain.com). )
Should be fixed in 2.4.4, let me know if you have any problems, thanks
The error does not occur during installation but at runtime. I was able to replicate the error on several PostgreSQL databases.
PHP: 7.3.25 Database driver & version : PostgreSQL 10.14 Craft edition & version: Craft Pro 3.6.12