Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mautic 4: Unable to merge companies #9826

Closed
RCheesley opened this issue Mar 25, 2021 · 2 comments · Fixed by #9847
Closed

Mautic 4: Unable to merge companies #9826

RCheesley opened this issue Mar 25, 2021 · 2 comments · Fixed by #9847
Assignees
Labels
bug Issues or PR's relating to bugs companies Anything related to companies mautic-4 Relates to Mautic 4.x T1 Low difficulty to fix (issue) or test (PR) themes Anything related to themes
Milestone

Comments

@RCheesley
Copy link
Member

RCheesley commented Mar 25, 2021

⚠️ This relates to Mautic 4 Alpha

Bug Description

I am unable to merge companies - the merge happened but it threw an error.

NB the first time it happened I ended up with a contact of the same name as the company I was merging.

Edit: To rule out sample data being the issue I tried to merge two companies that I created manually and the error still occurred but the random contact was not created. So that part seems to be an issue with the fixtures for contacts/companies maybe related to #9090.

Q A
Mautic version 4.0-Alpha1
PHP version 7.4
Browser Chrome

Steps to reproduce

  1. Install Mautic 4.0-alpha1 and install sample data
  2. Merge the company Amazon into Apple
  3. Notice the error - the merge has happened and the companies have been merged / contacts updated.

https://youtu.be/qXYFLaLQ_RM screen capture.

Log errors

[2021-03-25 14:58:02] mautic.DEBUG: COMPANY: Merging companies  
[2021-03-25 14:58:04] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Form\Exception\LogicException: "Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid()." at /var/www/html/vendor/symfony/form/Form.php line 745 {"exception":"[object] (Symfony\\Component\\Form\\Exception\\LogicException(code: 0): Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid(). at /var/www/html/vendor/symfony/form/Form.php:745)
[stacktrace]
#0 /var/www/html/app/bundles/CoreBundle/Controller/AbstractFormController.php(169): Symfony\\Component\\Form\\Form->isValid()
#1 /var/www/html/app/bundles/LeadBundle/Controller/CompanyController.php(405): Mautic\\CoreBundle\\Controller\\AbstractFormController->isFormValid(Object(Symfony\\Component\\Form\\Form))
#2 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(158): Mautic\\LeadBundle\\Controller\\CompanyController->editAction(3, false)
#3 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 2)
#4 /var/www/html/vendor/symfony/framework-bundle/Controller/ControllerTrait.php(96): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 2)
#5 /var/www/html/app/bundles/CoreBundle/Controller/CommonController.php(370): Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller->forward('MauticLeadBundl...', Array, Array)
#6 /var/www/html/app/bundles/CoreBundle/Controller/CommonController.php(300): Mautic\\CoreBundle\\Controller\\CommonController->ajaxAction(Array)
#7 /var/www/html/app/bundles/LeadBundle/Controller/CompanyController.php(936): Mautic\\CoreBundle\\Controller\\CommonController->postActionRedirect(Array)
#8 /var/www/html/app/bundles/CoreBundle/Controller/CommonController.php(458): Mautic\\LeadBundle\\Controller\\CompanyController->mergeAction('2', '')
#9 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(158): Mautic\\CoreBundle\\Controller\\CommonController->executeAction('merge', '2', 0, '')
#10 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)
#11 /var/www/html/vendor/symfony/http-kernel/Kernel.php(201): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#12 /var/www/html/app/AppKernel.php(104): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#13 /var/www/html/app/middlewares/CORSMiddleware.php(91): AppKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#14 /var/www/html/app/middlewares/CatchExceptionMiddleware.php(43): Mautic\\Middleware\\CORSMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#15 /var/www/html/app/middlewares/Dev/IpRestrictMiddleware.php(61): Mautic\\Middleware\\CatchExceptionMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#16 /var/www/html/app/middlewares/VersionCheckMiddleware.php(67): Mautic\\Middleware\\Dev\\IpRestrictMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#17 /var/www/html/app/middlewares/TrustMiddleware.php(51): Mautic\\Middleware\\VersionCheckMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#18 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\\Middleware\\TrustMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#19 /var/www/html/vendor/stack/run/src/Stack/run.php(13): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))
#20 /var/www/html/index_dev.php(25): Stack\
un(Object(Stack\\StackedHttpKernel))
#21 {main}
"} 
@RCheesley RCheesley added T1 Low difficulty to fix (issue) or test (PR) bug Issues or PR's relating to bugs companies Anything related to companies mautic-4 Relates to Mautic 4.x labels Mar 25, 2021
@RCheesley
Copy link
Member Author

There is something very strange happening with sample data I think.

https://youtu.be/YVDfd1CSdS4

Notice that the contacts being filtered do not actually have the company showing but some other random company.

I think that this may be related to the issue I raised some time ago in #9090 and not part of this bug.

@RCheesley
Copy link
Member Author

This error also occurred when I tried to delete a theme:

[2021-03-25 18:44:55] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Form\Exception\LogicException: "Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid()." at /var/www/html/vendor/symfony/form/Form.php line 745 {"exception":"[object] (Symfony\\Component\\Form\\Exception\\LogicException(code: 0): Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid(). at /var/www/html/vendor/symfony/form/Form.php:745)
[stacktrace]
#0 /var/www/html/app/bundles/CoreBundle/Controller/AbstractFormController.php(169): Symfony\\Component\\Form\\Form->isValid()
#1 /var/www/html/app/bundles/CoreBundle/Controller/ThemeController.php(55): Mautic\\CoreBundle\\Controller\\AbstractFormController->isFormValid(Object(Symfony\\Component\\Form\\Form))
#2 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(158): Mautic\\CoreBundle\\Controller\\ThemeController->indexAction()
#3 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 2)
#4 /var/www/html/vendor/symfony/framework-bundle/Controller/ControllerTrait.php(96): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 2)
#5 /var/www/html/app/bundles/CoreBundle/Controller/CommonController.php(370): Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller->forward('MauticCoreBundl...', Array, Array)
#6 /var/www/html/app/bundles/CoreBundle/Controller/CommonController.php(300): Mautic\\CoreBundle\\Controller\\CommonController->ajaxAction(Array)
#7 /var/www/html/app/bundles/CoreBundle/Controller/ThemeController.php(228): Mautic\\CoreBundle\\Controller\\CommonController->postActionRedirect(Array)
#8 /var/www/html/app/bundles/CoreBundle/Controller/CommonController.php(458): Mautic\\CoreBundle\\Controller\\ThemeController->batchDeleteAction(0, '')
#9 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(158): Mautic\\CoreBundle\\Controller\\CommonController->executeAction('batchDelete', 0, 0, '')
#10 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)
#11 /var/www/html/vendor/symfony/http-kernel/Kernel.php(201): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#12 /var/www/html/app/AppKernel.php(104): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#13 /var/www/html/app/middlewares/CORSMiddleware.php(91): AppKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#14 /var/www/html/app/middlewares/CatchExceptionMiddleware.php(43): Mautic\\Middleware\\CORSMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#15 /var/www/html/app/middlewares/Dev/IpRestrictMiddleware.php(61): Mautic\\Middleware\\CatchExceptionMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#16 /var/www/html/app/middlewares/VersionCheckMiddleware.php(67): Mautic\\Middleware\\Dev\\IpRestrictMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#17 /var/www/html/app/middlewares/TrustMiddleware.php(51): Mautic\\Middleware\\VersionCheckMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#18 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\\Middleware\\TrustMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#19 /var/www/html/vendor/stack/run/src/Stack/run.php(13): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))
#20 /var/www/html/index_dev.php(25): Stack\
un(Object(Stack\\StackedHttpKernel))
#21 {main}
"} 

@RCheesley RCheesley added the themes Anything related to themes label Mar 25, 2021
@mabumusa1 mabumusa1 self-assigned this Mar 28, 2021
@mabumusa1 mabumusa1 added this to the Mautic 4.0 milestone Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs companies Anything related to companies mautic-4 Relates to Mautic 4.x T1 Low difficulty to fix (issue) or test (PR) themes Anything related to themes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants