thedmsgroup / mautic-enhancer Goto Github PK
View Code? Open in Web Editor NEWVarious contact enhancer integrations for Mautic.
License: GNU General Public License v3.0
Various contact enhancer integrations for Mautic.
License: GNU General Public License v3.0
Mautic version: 2.14.1
Mautic-enhancer version: 2.14.2
I accedentally run mautic (2.14.1) with enhancer version 2.14.2. due to composer version set to "~2".
This cross-version usage causes a type error:
mautic.ERROR: PHP Error - Object of class DateTime could not be converted to string - in file /var/www/html/plugins/MauticEnhancerBundle/EventListen
er/LeadSubscriber.php - at line 71 [] []
I wonder if the same happens with mautic 2.14.2.
Anyway, I reverted enhancer version to 2.14.0. I just thought I should leave a note about the issue.
Alcazar is currently not displaying as a feature field
mautic:integration:enhancer:installgendernames
had been previously run on initial installation. Just hadn't gotten around to adding a new contact to this instance.
NB extended-fields
is also installed.
[2019-01-16 13:08:47] mautic.NOTICE: PHP Notice - Undefined index: gender - in file /var/www/torpedo/mautic/plugins/MauticExtendedFieldBundle/Entity/ExtendedFieldRepositoryTrait.php - at line 249
[2019-01-16 13:08:47] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\InvalidFieldNameException: "An exception occurred while executing 'UPDATE leads SET preferred_locale = ?, gender = ? WHERE id = ?' with params ["en_AU", "M", 27]:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'gender' in 'field list'" at /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 {"exception":"[object] (Doctrine\\DBAL\\Exception\\InvalidFieldNameException(code: 0): An exception occurred while executing 'UPDATE leads SET preferred_locale = ?, gender = ? WHERE id = ?' with params [\"en_AU\", \"M\", 27]:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'gender' in 'field list' at /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\\DBAL\\Driver\\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'gender' in 'field list' at /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'gender' in 'field list' 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/Connection.php(1015): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOMySql\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'UPDATE leads SE...', Array)
#2 /var/www/torpedo/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(678): Doctrine\\DBAL\\Connection->executeUpdate('UPDATE leads SE...', Array, Array)
#3 /var/www/torpedo/mautic/plugins/MauticExtendedFieldBundle/Entity/ExtendedFieldRepositoryTrait.php(265): Doctrine\\DBAL\\Connection->update('leads', Array, Array)
#4 /var/www/torpedo/mautic/plugins/MauticExtendedFieldBundle/Model/OverrideLeadModel.php(251): MauticPlugin\\MauticExtendedFieldBundle\\Entity\\OverrideLeadRepository->saveEntity(Object(Mautic\\LeadBundle\\Entity\\Lead))
#5 /var/www/torpedo/mautic/app/bundles/LeadBundle/Controller/LeadController.php(449): MauticPlugin\\MauticExtendedFieldBundle\\Model\\OverrideLeadModel->saveEntity(Object(Mautic\\LeadBundle\\Entity\\Lead))
#6 /var/www/torpedo/mautic/app/bundles/CoreBundle/Controller/CommonController.php(475): Mautic\\LeadBundle\\Controller\\LeadController->newAction(0, '')
#7 /var/www/torpedo/mautic/vendor/symfony/http-kernel/HttpKernel.php(135): Mautic\\CoreBundle\\Controller\\CommonController->executeAction('new', 0, 0, '')
#8 /var/www/torpedo/mautic/vendor/symfony/http-kernel/HttpKernel.php(57): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)
#9 /var/www/torpedo/mautic/vendor/symfony/http-kernel/DependencyInjection/ContainerAwareHttpKernel.php(67): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#10 /var/www/torpedo/mautic/vendor/symfony/http-kernel/Kernel.php(183): Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#11 /var/www/torpedo/mautic/app/AppKernel.php(141): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#12 /var/www/torpedo/mautic/app/middlewares/CORSMiddleware.php(93): AppKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#13 /var/www/torpedo/mautic/app/middlewares/CatchExceptionMiddleware.php(45): Mautic\\Middleware\\CORSMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#14 /var/www/torpedo/mautic/app/middlewares/VersionCheckMiddleware.php(57): Mautic\\Middleware\\CatchExceptionMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#15 /var/www/torpedo/mautic/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\\Middleware\\VersionCheckMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#16 /var/www/torpedo/mautic/vendor/stack/run/src/Stack/run.php(13): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))
#17 /var/www/torpedo/mautic/index.php(37): Stack\^Mun(Object(Stack\\StackedHttpKernel))
#18 {main}
"}
[2019-01-16 03:13:09] mautic.INFO: names.zip downloaded
[2019-01-16 03:13:09] mautic.INFO: Archive extracted to /tmp/genderNames/
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}
AgeFromDateofBirth had several duplicated fields in the lead_fields table. Some were built before the installed field check was built, but not all. This needs to be cleaned up and corrected....The other enhancers should be checked as well.
We use mautic in a K8S/docker environment. I included the mautic:integration:enhancer:installcspcdata command into the entrypoint.sh to ensure that the command is run if a new instance is launched.
However it also runs whenever I upgrade versions and restart the container.
Is there a way to include a status check in the command to prevent lengthy database requests from happenning is the reference table is present and up to date?
My email links (if rewritten by Mautic) do not work properly, there is an error:
mautic.ERROR: PHP Error - Object of class DateTime could not be converted to string - in file /var/app/current/plugins/MauticEnhancerBundle/EventListener/LeadSubscriber.php - at line 71
I wasn't able to find the reason for this error yet ... Any ideas?
I installed the plugin, but I couldn't make 'Age from birthdate' function to work.
I couldn't find documentation about this issue, so I digged into the code and found out that the enhancement works only from hardcoded source fields, namely 'dob_year', 'dob_month', 'dob_day'. Newer version works with field named 'dob' too.
I however already have a field named 'birthday' to store birthdays. Now I'm stuck. In order to use this function I would have to change my mautic application to use the field 'dob', instead of my previously existent 'birthday' and migrate data from one field to another.
It would be nice to set the source field name in the plugin configuration just like the field name for random number is needed to set.
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.