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

Does not handle string values in Pipedrive that are too long gracefully #5

Open
stevedrobinson opened this issue Mar 3, 2023 · 2 comments

Comments

@stevedrobinson
Copy link

stevedrobinson commented Mar 3, 2023

If string values are too long in Pipedrive, the plugin fails sync with an error instead of truncating the data gracefully.

 [ERROR] An exception occurred while executing 'UPDATE leads SET date_modified =
         ?, title = ?, company = ?, country = ? WHERE id = ?' with params       
         ["2023-03-03 04:29:48", "I help business owners and entrepreneurs      
         develop graphic solutions to solve real business problems, I Help      
         Business Owners and Entrepreneurs Develop Graphic Solutions to Solve   
         Real Business Problems", "Company Corporation", null, "20067"]:         
                                                                                
         SQLSTATE[22001]: String data, right truncated: 1406 Data too long for  
         column 'title' at row 1 
@kuzmany
Copy link
Collaborator

kuzmany commented Mar 3, 2023

But this is on Mautic side. Adding a title longer like 191 characters will break it anyway. You can test it with import. You should create issue in Mautic repo

@kuzmany kuzmany closed this as completed Mar 3, 2023
@stevedrobinson
Copy link
Author

Running into this issue on a second install, and I think this might become more of an issue for others. It seems that the Pipedrive chatbot will take whatever people answer for their name, regardless of length, and put it into the person's name.

So if a website visitor types a bunch of garbage into the chatbot prompt for name, then the sync will fail on that record and not move onto any other records that are supposed to sync in that time period because the error will stop the sync command.

It would be much better if length were checked on string fields and if longer than 191 characters, skip the field and log it to the error log. That way, the plugin can keep going to the next record in the batch to sync.

@kuzmany kuzmany reopened this Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants