Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff.txt | 3.78 KB | Safallia Joseph |
#5 | 3091215-handler_error_response-05.patch | 11.34 KB | Safallia Joseph |
#2 | 3091215-handler_error_response-01.patch | 10.41 KB | Safallia Joseph |
Comments
Comment #2
Safallia Joseph CreditAttribution: Safallia Joseph at Acro Commerce commented@travis the attached patch checks the status code and set pardot submission status. This still does not solve the scenario of a post request being successful but a submission is not made in pardot because of form validation errors. Pardot does not send us back the validation errors. Its actually a edge case scenario, we expect admins to set whatever is set as required in pardot form to be set as required in webform too.
Please review the attached patch
Comment #3
Safallia Joseph CreditAttribution: Safallia Joseph at Acro Commerce commentedComment #4
travis-bradbury CreditAttribution: travis-bradbury at Acro Commerce commentedSmoothing out the edge cases is what separates this from the 'remote post' webform handler.
This is also a case that I was hoping to see us handle, unless Pardot makes it physically impossible.
There's a lot of things that can happen when submitting the data and only one of them is success. That's the edge case.
How does someone know they didn't match the forms? Weeks later someone notices they're not getting the marketing leads they expected? Then a developer has to get in there and debug things until they finally spot a simple mismatch?
What does Pardot send back? Can we give some hints when things fail?
Can't we get more specific than that? Does Pardot ever give 4xx responses? Which ones? Including the actual code would be a start. At least it might mean something to a developer. If it's a 5xx code we should log a message that says it was an error on Pardot's end. If it's 4xx it's not Pardot's problem and we can give something more helpful than "unexected error".
$entity is undefined.
What is a status string?
"Get response data" and "@return Updated pardot submission entity" are conflicting.
Comment #5
Safallia Joseph CreditAttribution: Safallia Joseph at Acro Commerce commented@tbradbury
In Pardot response we would be getting errors string `Field is required`, So I have added code to check if the response have that string and added log accordingly
I have modified the log message, I have also included the status code in log message so that will be helpful in debugging.
I have also fixed the other code standard issues. Could you please review.
Comment #6
Safallia Joseph CreditAttribution: Safallia Joseph at Acro Commerce commentedComment #8
Safallia Joseph CreditAttribution: Safallia Joseph at Acro Commerce commented@Travis I have committed the changes, Please let me know if you think it needs further modifications.
Comment #9
travis-bradbury CreditAttribution: travis-bradbury at Acro Commerce commented