ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 3 replies, has 2 voices, and was last updated by  Alexandr Smaga 2 years, 9 months ago.

  • Creator
    Topic
  • #5078

    thomasEpsi
    Participant

    Hello everybody, i have a probleme with REST Bundle , i create some Get HTTP and all work well , but the POST HTTP not very well, and this since 3 days…
    I have the same error :

    Warning: array_replace(): Argument #1 is not an array in D:\projects\Groupe_GC\vendor\oro\platform\src\Oro\Bundle\SoapBundle\Form\EventListener\PatchSubscriber.php on line 30

    and in my product controller i have this method
    /**
    * REST POST Product
    *
    * @ApiDoc(
    * section="Product",
    * description="Post product item",
    * resource=true
    * )
    *
    */
    public function postAction()
    {
    return $this->handleCreateRequest();
    }

    after i create the handler like AccountHandler of OroCrm , the services , and ApiType .. as the api rest of Account in oro…
    The probleme come when the patchSubscriber want to unbind($form)
    but i don’t understand why values are null , whereas in sandBox of nelmio , i put well the header and json value..

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #5080

    thomasEpsi
    Participant

    i answer this probleme, i forget to add $builder . but now my problem is , when i did handleCreateRequest() , the line $entity = $this->getManager->createEntity() return null so i have and error 500 , whereas if i comment this line and pu this code :

    the entity is fill well and the process is good, So my objet is created.
    So why $entity = $this->getManager->createEntity() return me null

    #5081

    thomasEpsi
    Participant

    i answer again to my second question . It was my json format which was wrong

    #5089

    Alexandr Smaga
    Participant

    Hello. Nice to hear that it’s working correct. We are planning to do some improvements for REST api and I hope then we will add detailed documentation.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.