Forums › Forums › OroCRM › OroCRM – Installation/Technical Issues or Problems › Using request of type 'patch' to update a user's profile fails from web client
This topic contains 4 replies, has 2 voices, and was last updated by stef 7 years, 4 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- October 28, 2016 at 12:09 pm #27442
I get this error when calling the api call api/users/1
to update a user:{“code”:500,”message”:”Processor failed: \”oro_api.get_metadata.load_metadata\”. Reason: Class users does not exist”}
The weird part is, this call succeeds when called from curl.
The payload is as follows:
PHP123456789{"data": {"type": "users","id": "1","attributes": {"email": "testme343@ville.montreal.qc.ca"}}}Any suggestions on how to resolve this would be greatly appreciated!
Stef
Dream, in a pragmatic way.
— Aldous Huxley - CreatorTopic
- AuthorReplies
- October 28, 2016 at 1:56 pm #27443
I also get this message, sometimes:
The group "normalize_data" is not defined. Processor: "oro_api.create.load_normalized_entity".<br />
Thanks!Dream, in a pragmatic way.
— Aldous HuxleyNovember 1, 2016 at 9:23 am #27444Hi
It is very strange, i have tried your json with PATCH method via curl_exec function and successfully updated my entity. Can you put this code there and show me the result ? Which version of oro are you using ?
PHP1var_dump($previous->getTrace());November 3, 2016 at 9:02 am #27445Hi Mike,
Here is the stack trace:
* Of interest is the other error message that is returned:
{“code”:500,”message”:”Processor failed: \”oro_api.get_metadata.load_metadata\”. Reason: Class users does not exist”}
* Also, when the request is made from Curl, the class loaded in MetadataPovider::getMetadata() is:
1classname = Oro\\Bundle\\UserBundle\\Entity\\UserWhen called from external source:
1classname = usersStacktrace:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Component/ChainProcessor/Exception/ExecutionFailedException.php:36:array (size=25)0 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/app/cache/dev/classes.php' (length=77)'line' => int 7976'function' => string '__construct' (length=11)'class' => string 'ReflectionClass' (length=15)'type' => string '->' (length=2)'args' =>array (size=1)0 => string 'users' (length=5)1 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/EntityBundle/ORM/Registry.php' (length=116)'line' => int 35'function' => string 'getManagerForClass' (length=18)'class' => string 'Doctrine\Common\Persistence\AbstractManagerRegistry' (length=51)'type' => string '->' (length=2)'args' =>array (size=1)0 => string 'users' (length=5)2 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Util/DoctrineHelper.php' (length=120)'line' => int 25'function' => string 'getManagerForClass' (length=18)'class' => string 'Oro\Bundle\EntityBundle\ORM\Registry' (length=36)'type' => string '->' (length=2)'args' =>array (size=1)0 => string 'users' (length=5)3 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Processor/GetMetadata/LoadMetadata.php' (length=135)'line' => int 76'function' => string 'isManageableEntityClass' (length=23)'class' => string 'Oro\Bundle\ApiBundle\Util\DoctrineHelper' (length=40)'type' => string '->' (length=2)'args' =>array (size=1)0 => string 'users' (length=5)4 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Component/ChainProcessor/Debug/TraceableProcessor.php' (length=133)'line' => int 46'function' => string 'process' (length=7)'class' => string 'Oro\Bundle\ApiBundle\Processor\GetMetadata\LoadMetadata' (length=55)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\GetMetadata\MetadataContext)[227]...5 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Component/ChainProcessor/ChainProcessor.php' (length=123)'line' => int 42'function' => string 'process' (length=7)'class' => string 'Oro\Component\ChainProcessor\Debug\TraceableProcessor' (length=53)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\GetMetadata\MetadataContext)[227]...6 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Component/ChainProcessor/ChainProcessor.php' (length=123)'line' => int 28'function' => string 'executeProcessors' (length=17)'class' => string 'Oro\Component\ChainProcessor\ChainProcessor' (length=43)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\GetMetadata\MetadataContext)[227]...7 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Component/ChainProcessor/Debug/TraceableActionProcessor.php' (length=139)'line' => int 49'function' => string 'process' (length=7)'class' => string 'Oro\Component\ChainProcessor\ChainProcessor' (length=43)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\GetMetadata\MetadataContext)[227]...8 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Provider/MetadataProvider.php' (length=126)'line' => int 123'function' => string 'process' (length=7)'class' => string 'Oro\Component\ChainProcessor\Debug\TraceableActionProcessor' (length=59)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\GetMetadata\MetadataContext)[227]...9 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Provider/MetadataProvider.php' (length=126)'line' => int 77'function' => string 'loadMetadata' (length=12)'class' => string 'Oro\Bundle\ApiBundle\Provider\MetadataProvider' (length=46)'type' => string '->' (length=2)'args' =>array (size=6)0 => string 'users' (length=5)1 => null2 =>object(Oro\Bundle\ApiBundle\Request\RequestType)[249]...3 =>object(Oro\Bundle\ApiBundle\Config\EntityDefinitionConfig)[226]...4 =>array (size=0)...5 => boolean false10 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Processor/Context.php' (length=118)'line' => int 766'function' => string 'getMetadata' (length=11)'class' => string 'Oro\Bundle\ApiBundle\Provider\MetadataProvider' (length=46)'type' => string '->' (length=2)'args' =>array (size=5)0 => string 'users' (length=5)1 => null2 =>object(Oro\Bundle\ApiBundle\Request\RequestType)[249]...3 =>object(Oro\Bundle\ApiBundle\Config\EntityDefinitionConfig)[226]...4 =>array (size=0)...11 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Processor/Context.php' (length=118)'line' => int 730'function' => string 'loadMetadata' (length=12)'class' => string 'Oro\Bundle\ApiBundle\Processor\Context' (length=38)'type' => string '->' (length=2)'args' =>array (size=0)empty12 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Processor/Shared/CompleteErrors.php' (length=132)'line' => int 43'function' => string 'getMetadata' (length=11)'class' => string 'Oro\Bundle\ApiBundle\Processor\Context' (length=38)'type' => string '->' (length=2)'args' =>array (size=0)empty13 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Component/ChainProcessor/Debug/TraceableProcessor.php' (length=133)'line' => int 46'function' => string 'process' (length=7)'class' => string 'Oro\Bundle\ApiBundle\Processor\Shared\CompleteErrors' (length=52)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\Update\UpdateContext)[250]...14 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Processor/RequestActionProcessor.php' (length=133)'line' => int 118'function' => string 'process' (length=7)'class' => string 'Oro\Component\ChainProcessor\Debug\TraceableProcessor' (length=53)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\Update\UpdateContext)[250]...15 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Processor/RequestActionProcessor.php' (length=133)'line' => int 101'function' => string 'executeNormalizeResultProcessors' (length=32)'class' => string 'Oro\Bundle\ApiBundle\Processor\RequestActionProcessor' (length=53)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\Update\UpdateContext)[250]...16 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Component/ChainProcessor/ChainProcessor.php' (length=123)'line' => int 28'function' => string 'executeProcessors' (length=17)'class' => string 'Oro\Bundle\ApiBundle\Processor\RequestActionProcessor' (length=53)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\Update\UpdateContext)[250]...17 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Component/ChainProcessor/Debug/TraceableActionProcessor.php' (length=139)'line' => int 49'function' => string 'process' (length=7)'class' => string 'Oro\Component\ChainProcessor\ChainProcessor' (length=43)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\Update\UpdateContext)[250]...18 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/vendor/oro/platform/src/Oro/Bundle/ApiBundle/Controller/RestApiController.php' (length=129)'line' => int 142'function' => string 'process' (length=7)'class' => string 'Oro\Component\ChainProcessor\Debug\TraceableActionProcessor' (length=59)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Oro\Bundle\ApiBundle\Processor\Update\UpdateContext)[250]...19 =>array (size=4)'function' => string 'patchAction' (length=11)'class' => string 'Oro\Bundle\ApiBundle\Controller\RestApiController' (length=49)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Symfony\Component\HttpFoundation\Request)[2]...20 =>array (size=4)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/app/bootstrap.php.cache' (length=75)'line' => int 3238'function' => string 'call_user_func_array' (length=20)'args' =>array (size=2)0 =>array (size=2)...1 =>array (size=1)...21 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/app/bootstrap.php.cache' (length=75)'line' => int 3197'function' => string 'handleRaw' (length=9)'class' => string 'Symfony\Component\HttpKernel\HttpKernel' (length=39)'type' => string '->' (length=2)'args' =>array (size=2)0 =>object(Symfony\Component\HttpFoundation\Request)[2]...1 => int 122 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/app/bootstrap.php.cache' (length=75)'line' => int 3351'function' => string 'handle' (length=6)'class' => string 'Symfony\Component\HttpKernel\HttpKernel' (length=39)'type' => string '->' (length=2)'args' =>array (size=3)0 =>object(Symfony\Component\HttpFoundation\Request)[2]...1 => int 12 => boolean true23 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/app/bootstrap.php.cache' (length=75)'line' => int 2536'function' => string 'handle' (length=6)'class' => string 'Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel' (length=73)'type' => string '->' (length=2)'args' =>array (size=3)0 =>object(Symfony\Component\HttpFoundation\Request)[2]...1 => int 12 => boolean true24 =>array (size=6)'file' => string '/home/dev/www/poc-dashboard/BackEnd/crm-application/web/app_dev.php' (length=67)'line' => int 30'function' => string 'handle' (length=6)'class' => string 'Symfony\Component\HttpKernel\Kernel' (length=35)'type' => string '->' (length=2)'args' =>array (size=1)0 =>object(Symfony\Component\HttpFoundation\Request)[2]...{"code":500,"message":"Processor failed: \"oro_api.get_metadata.load_metadata\". Reason: Class users does not exist"}Dream, in a pragmatic way.
— Aldous HuxleyNovember 3, 2016 at 12:51 pm #27446UPDATE: Issue is resolved.
The client code had semi-colon at the end of the content-type header.
PS: Big thanks to Mike for the debugging cue.
Dream, in a pragmatic way.
— Aldous Huxley - AuthorReplies
The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.