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

Salesforce import handling of names with bad characters #5249

Closed
chrisinf opened this issue Oct 31, 2017 · 0 comments
Closed

Salesforce import handling of names with bad characters #5249

chrisinf opened this issue Oct 31, 2017 · 0 comments
Assignees
Labels
bug Issues or PR's relating to bugs
Milestone

Comments

@chrisinf
Copy link

chrisinf commented Oct 31, 2017

What type of report is this:

Q A
Bug report? Yes
Feature request? No
Enhancement? No

Description:

Salesforce data might contain characters such as a backslash. While this data imports to mautic successfully, it does not seem to be escaped or encoded correctly when passed back into the salesforce API (during the "Mautic to Salesforce" phase).

I believe the following error comes from the Salesforce call itself, i.e. this is not a PHP/code-related error:

Updating/creating companies from Mautic to Salesforce
About 0 to update and about 15654 to create/update
     3/15654 [>---------------------------]   0%

  [Mautic\PluginBundle\Exception\ApiErrorException]
  Solutions','Mxxxxxxxxxxxy Solutions','md\PAxxxxxxxxxxx Services','Mxxx'
                                      ^
  ERROR at Row:1:Column:710
  Invalid string literal 'md\PAxxxxxxxxxxx Services'. Illegal character sequence '\P' in string literal.

If a bug:

Q A
Mautic version 2.11.0
PHP version 7.0.24

Steps to reproduce:

  1. Save a record in salesforce with a company name or contact position/title containing characters which will not pass SOSL/SOQL query validation (i.e. use restricted characters). In the problematic case it was a string containing \P (md\PBB Zxxxhxhx for example).

  2. Run the mautic:integration:fetchleads command and pull the record from step 1

Log errors:

  1. This log is specific to this request (its the same one referenced above)
[2017-10-30 06:43:22] mautic.NOTICE: Mautic\PluginBundle\Exception\ApiErrorException:  Solutions','MD Technology Solutions','md\PAxxxxxxxxxxx Services','Mdec'
    ^ ERROR at Row:1:Column:710 Invalid string literal 'md\PAxxxxxxxxxxx Services'. Illegal character sequence '\P' in string literal. (uncaught exception) at /var/www/html/plugins/MauticCrmB
undle/Api/SalesforceApi.php line 83 while running console command `mautic:integration:fetchleads` [] []
  1. This log was found prior to the previous log. Looks like the same issue with a different piece of (similarly unescaped) data.
[2017-10-30 05:29:30] mautic.NOTICE: Mautic\PluginBundle\Exception\ApiErrorException:  American Xxxxxx Inc \','American Xxxxxxxxx Services','American
  ^ ERROR at Row:1:Column:1688 expecting a right parentheses, found 'American' (uncaught exception) at /var/www/html/plugins/MauticCrmBundle/Api/SalesforceApi.php line 83 while running conso
le command `mautic:integration:fetchleads` [] []

Extra

These articles were useful in troubleshooting:

@escopecz escopecz added the bug Issues or PR's relating to bugs label Nov 6, 2017
@justinfortes justinfortes added this to the 2.13.0 milestone Jan 24, 2018
@alanhartless alanhartless added the ready-to-test PR's that are ready to test label Mar 20, 2018
@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 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
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

No branches or pull requests

5 participants