Skip to content

SQL error trying to enable Age from Birthdate #76

@virgilwashere

Description

@virgilwashere

FYI extended-field is also installed, and enabled.

'disable_lead_table_fields' => 1,

[2019-01-16 13:57:07] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing 'INSERT INTO audit_log (user_id, user_name, bundle, object, object_id, action, details, date_added, ip_address) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [3, "Virgil .", "lead", "field", "", "create", "a:5:{s:5:\"alias\";a:2:{i:0;N;i:1;s:7:\"afb_age\";}s:4:\"type\";a:2:{i:0;s:4:\"text\";i:1;s:6:\"number\";}s:6:\"object\";a:2:{i:0;s:4:\"lead\";i:1;s:13:\"extendedField\";}s:5:\"label\";a:2:{i:0;N;i:1;s:3:\"Age\";}s:10:\"properties\";a:2:{i:0;a:0:{}i:1;s:62:\"a:3:{s:9:\"roundmode\";i:6;s:5:\"scale\";i:0;s:9:\"precision\";i:0;}\";}}", "2019-01-16 03:57:07", "101.162.1.1"]:

SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'object_id' at row 1" at /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing 'INSERT INTO audit_log (user_id, user_name, bundle, object, object_id, action, details, date_added, ip_address) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [3, \"Virgil .\", \"lead\", \"field\", \"\", \"create\", \"a:5:{s:5:\\\"alias\\\";a:2:{i:0;N;i:1;s:7:\\\"afb_age\\\";}s:4:\\\"type\\\";a:2:{i:0;s:4:\\\"text\\\";i:1;s:6:\\\"number\\\";}s:6:\\\"object\\\";a:2:{i:0;s:4:\\\"lead\\\";i:1;s:13:\\\"extendedField\\\";}s:5:\\\"label\\\";a:2:{i:0;N;i:1;s:3:\\\"Age\\\";}s:10:\\\"properties\\\";a:2:{i:0;a:0:{}i:1;s:62:\\\"a:3:{s:9:\\\"roundmode\\\";i:6;s:5:\\\"scale\\\";i:0;s:9:\\\"precision\\\";i:0;}\\\";}}\", \"2019-01-16 03:57:07\", \"101.162.1.1\"]:

SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'object_id' at row 1 at /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115, Doctrine\\DBAL\\Driver\\PDOException(code: HY000): SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'object_id' at row 1 at /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'object_id' at row 1 at /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)
[stacktrace]
#0 /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(128): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\PDOException))
#1 /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(177): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOMySql\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'INSERT INTO aud...', Array)
#2 /var/www/torpedo/mautic/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(281): Doctrine\\DBAL\\Statement->execute()
#3 /var/www/torpedo/mautic/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1014): Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister->executeInserts()
#4 /var/www/torpedo/mautic/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(378): Doctrine\\ORM\\UnitOfWork->executeInserts(Object(Doctrine\\ORM\\Mapping\\ClassMetadata))
#5 /var/www/torpedo/mautic/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(356): Doctrine\\ORM\\UnitOfWork->commit(Object(Mautic\\CoreBundle\\Entity\\AuditLog))
#6 /var/www/torpedo/mautic/app/bundles/CoreBundle/Entity/CommonRepository.php(801): Doctrine\\ORM\\EntityManager->flush(Object(Mautic\\CoreBundle\\Entity\\AuditLog))
#7 /var/www/torpedo/mautic/app/bundles/CoreBundle/Model/AuditLogModel.php(65): Mautic\\CoreBundle\\Entity\\CommonRepository->saveEntity(Object(Mautic\\CoreBundle\\Entity\\AuditLog))
#8 /var/www/torpedo/mautic/app/bundles/LeadBundle/EventListener/LeadSubscriber.php(181): Mautic\\CoreBundle\\Model\\AuditLogModel->writeToLog(Array)
#9 [internal function]: Mautic\\LeadBundle\\EventListener\\LeadSubscriber->onFieldPostSave(Object(Mautic\\LeadBundle\\Event\\LeadFieldEvent), 'mautic.lead_fie...', Object(Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))
#10 /var/www/torpedo/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(184): call_user_func(Array, Object(Mautic\\LeadBundle\\Event\\LeadFieldEvent), 'mautic.lead_fie...', Object(Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))
#11 /var/www/torpedo/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\\Component\\EventDispatcher\\EventDispatcher->doDispatch(Array, 'mautic.lead_fie...', Object(Mautic\\LeadBundle\\Event\\LeadFieldEvent))
#12 /var/www/torpedo/mautic/plugins/MauticEnhancerBundle/Integration/AbstractEnhancerIntegration.php(135): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch('mautic.lead_fie...', Object(Mautic\\LeadBundle\\Event\\LeadFieldEvent))
#13 /var/www/torpedo/mautic/plugins/MauticEnhancerBundle/EventListener/PluginSubscriber.php(44): MauticPlugin\\MauticEnhancerBundle\\Integration\\AbstractEnhancerIntegration->buildEnhancerFields()
#14 [internal function]: MauticPlugin\\MauticEnhancerBundle\\EventListener\\PluginSubscriber->buildEnhancerFields(Object(Mautic\\PluginBundle\\Event\\PluginIntegrationEvent), 'mautic.plugin_o...', Object(Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))
#15 /var/www/torpedo/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(184): call_user_func(Array, Object(Mautic\\PluginBundle\\Event\\PluginIntegrationEvent), 'mautic.plugin_o...', Object(Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))
#16 /var/www/torpedo/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\\Component\\EventDispatcher\\EventDispatcher->doDispatch(Array, 'mautic.plugin_o...', Object(Mautic\\PluginBundle\\Event\\PluginIntegrationEvent))
#17 /var/www/torpedo/mautic/app/bundles/PluginBundle/Controller/PluginController.php(266): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch('mautic.plugin_o...', Object(Mautic\\PluginBundle\\Event\\PluginIntegrationEvent))
#18 /var/www/torpedo/mautic/vendor/symfony/http-kernel/HttpKernel.php(135): Mautic\\PluginBundle\\Controller\\PluginController->configAction('AgeFromBirthdat...', 'details-contain...', 0)
#19 /var/www/torpedo/mautic/vendor/symfony/http-kernel/HttpKernel.php(57): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)
#20 /var/www/torpedo/mautic/vendor/symfony/http-kernel/DependencyInjection/ContainerAwareHttpKernel.php(67): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#21 /var/www/torpedo/mautic/vendor/symfony/http-kernel/Kernel.php(183): Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#22 /var/www/torpedo/mautic/app/AppKernel.php(141): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#23 /var/www/torpedo/mautic/app/middlewares/CORSMiddleware.php(93): AppKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#24 /var/www/torpedo/mautic/app/middlewares/CatchExceptionMiddleware.php(45): Mautic\\Middleware\\CORSMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#25 /var/www/torpedo/mautic/app/middlewares/VersionCheckMiddleware.php(57): Mautic\\Middleware\\CatchExceptionMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#26 /var/www/torpedo/mautic/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\\Middleware\\VersionCheckMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#27 /var/www/torpedo/mautic/vendor/stack/run/src/Stack/run.php(13): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))
un(Object(Stack\\StackedHttpKernel))p(37): Stack\
#29 {main}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions