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

Fix clone campaign with form source #7642

Open
wants to merge 1 commit into
base: staging
from

Conversation

Projects
None yet
3 participants
@kuzmany
Copy link
Contributor

commented Jun 24, 2019

Please be sure you are submitting this against the staging branch.

Q A
Bug fix?
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs) #7127
BC breaks?
Deprecations?

Description:

Clone campaing with form source return 500 error. This PR fixed it

Steps to reproduce

  1. Create a new campaign such as in the screenshot below

image

  1. Clone the campaign
  2. Save the clone

The campaign is saved but an error page is shown

image

Go back to the clone and see the campaign builder :

image

Log errors

[2019-01-12 14:36:24] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\UniqueConstraintViolationException: "An exception occurred while executing 'INSERT INTO campaign_form_xref (campaign_id, form_id) VALUES (?, ?)' with params [15, 10]:  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '15-10' for key 'PRIMARY'" at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 66 {"exception":"[object] (Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException(code: 0): An exception occurred while executing 'INSERT INTO campaign_form_xref (campaign_id, form_id) VALUES (?, ?)' with params [15, 10]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '15-10' for key 'PRIMARY' at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:66, Doctrine\\DBAL\\Driver\\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '15-10' for key 'PRIMARY' at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '15-10' for key 'PRIMARY' at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)"} []

Steps to test this PR:

  1. Load up this PR
  2. Repeat all steps, and see If there is not error

@kuzmany kuzmany added this to the 2.16.0 milestone Jun 24, 2019

@florentpetitjean
Copy link

left a comment

working on Mautibox

@virgilwashere
Copy link

left a comment

Patch works in my environment (2.15.0) as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.