mautic / mautic/api-library

create error 500

Open
#188 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
205
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Hi,

https://developer.mautic.org/?php#create-contact

after updating Mautic from 2.15.0 to 2.15.1, (mautic api 2.15 and even 2.15-beta) the create contact method respond in an error (testet with custom php unit test, was green before, and manual with postman saved request):

The response has unexpected status code (500).
Log says:

[2019-03-27 10:05:50] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Validator\Exception\UnexpectedTypeException: "Expected argument of type "string", "array" given" at ../wwwdocs/vendor/symfony/validator/Constraints/LengthValidator.php line 38 {"exception":"[object] (Symfony\Component\Validator\Exception\UnexpectedTypeException(code: 0): Expected argument of type "string", "array" given at ../wwwdocs/vendor/symfony/validator/Constraints/LengthValidator.php:38)"} []

Reading actions retrieve contact data, whithout error. Are there any breaking changes in requesting create contact?

  • Cache was cleared
  • Backend is running

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the create-contact request from https://developer.mautic.org/?php#create-contact using the custom PHPUnit test or saved Postman request, comparing Mautic 2.15.0 with 2.15.1. Start with the logged Symfony Validator LengthValidator.php failure and trace the request data that reaches it. Done means the create-contact request no longer returns HTTP 500 and the existing test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.