OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

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

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #26125


    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
  • #26126


    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



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


    Alexandr Smaga

    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)

The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No