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

Escape backslashes in company names (and just in case, contact emails) #5835

Merged
merged 2 commits into from Mar 22, 2018

Conversation

alanhartless
Copy link
Contributor

@alanhartless alanhartless commented Mar 20, 2018

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

Description:

If a company name has a backslash, the sync will fail with a SF SQL error.

Steps to reproduce the bug:

  1. Create a company in Mautic where the name has a backslash in it
  2. Setup SF sync per the documentation enabling push to integration and enable the Company object
  3. Run the php app/console m:i:s -i Salesforce -a "5 min" command
  4. Note the error

Steps to test this PR:

  1. Run the command again the company should push to SF
  2. Run the updated unit tests

@alanhartless alanhartless added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test labels Mar 20, 2018
@alanhartless alanhartless added this to the 2.13.0 milestone Mar 20, 2018
@mautibot mautibot added the code-review-needed PR's that require a code review before merging label Mar 20, 2018
@escopecz escopecz self-assigned this Mar 21, 2018
@escopecz
Copy link
Sponsor Member

It does not fix the error for me after I check out this PR:

 [Mautic\PluginBundle\Exception\ApiErrorException]
  isDeleted = false and Name in ('back\slash')
                                ^
  ERROR at Row:1:Column:138
  Invalid string literal 'back\slash'. Illegal character sequence '\s' in string literal.

Clearing the cache and re-saving the SF plugin did not help.

@escopecz escopecz added pending-feedback PR's and issues that are awaiting feedback from the author and removed review labels Mar 21, 2018
@alanhartless
Copy link
Contributor Author

Sorry to waste your time on this @escopecz. It's working now.

@alanhartless alanhartless removed the pending-feedback PR's and issues that are awaiting feedback from the author label Mar 21, 2018
Copy link
Sponsor Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The account got pushed now. Thanks Alan! 👍

@mautibot mautibot removed the code-review-needed PR's that require a code review before merging label Mar 21, 2018
@escopecz escopecz added the pending-test-confirmation PR's that require one test before they can be merged label Mar 21, 2018
@javjim
Copy link

javjim commented Mar 22, 2018

Reproduced bug, and pr fixes this great job

@javjim javjim added ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged and removed pending-test-confirmation PR's that require one test before they can be merged ready-to-test PR's that are ready to test labels Mar 22, 2018
@escopecz escopecz removed the ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged label Mar 22, 2018
@escopecz escopecz merged commit 5ee89fc into mautic:staging Mar 22, 2018
@alanhartless alanhartless deleted the bug-salesforce-value-escaping branch May 24, 2018 22:42
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants