Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

Getting 500 error on hitting the api for taxonomy terms #69

Open
himanshusindhwani opened this issue Jan 12, 2018 · 2 comments
Open

Getting 500 error on hitting the api for taxonomy terms #69

himanshusindhwani opened this issue Jan 12, 2018 · 2 comments

Comments

@himanshusindhwani
Copy link

I created a taxonomy and added terms to it . After adding terms , I assigned those terms to the respective node of article content model . What I wanted was to filter the node according to the taxonomy term .
But I am getting internal server error on filtering the data using taxonomy term . Also when I hit the json url generated by reservoir to list the taxonomy_terms . It shows internal server error .

@tedbow
Copy link

tedbow commented Mar 27, 2018

Can check the error log in Drupal and report the actual error here?

@Vassi
Copy link

Vassi commented Apr 17, 2018

I'm seeing the same issue with the taxonomy API out of the box, here's what my log has:

172.17.0.1 - - [17/Apr/2018:20:47:20 +0000] "GET /jsonapi/taxonomy_term/tags HTTP/1.1" 500 74 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"
172.17.0.1 - - [17/Apr/2018:20:49:54 +0000] "GET / HTTP/1.1" 403 4700 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Kitematic/0.17.2 Chrome/45.0.2454.85 Electron/0.35.4 Safari/537.36"
[Tue Apr 17 20:50:16.786552 2018] [php7:notice] [pid 80] [client 172.17.0.1:35048] 
Error: Call to a member function getTypeName() on null in /app/drupal/docroot/modules/contrib/jsonapi/src/Normalizer/Value/RelationshipItemNormalizerValue.php on line 43 
#0 /app/drupal/docroot/modules/contrib/jsonapi/src/Normalizer/Value/FieldNormalizerValue.php(67): Drupal\\jsonapi\\Normalizer\\Value\\RelationshipItemNormalizerValue->rasterizeValue()\n
#1 /app/drupal/docroot/modules/contrib/jsonapi/src/Normalizer/Value/RelationshipNormalizerValue.php(66): Drupal\\jsonapi\\Normalizer\\Value\\FieldNormalizerValue->rasterizeValue()\n
#2 /app/drupal/docroot/modules/contrib/jsonapi/src/Normalizer/Value/EntityNormalizerValue.php(107): Drupal\\jsonapi\\Normalizer\\Value\\RelationshipNormalizerValue->rasterizeValue()\n
#3 /app/drupal/docroot/modules/contrib/jsonapi/src/Normalizer/Value/JsonApiDocumentTopLevelNormalizerValue.php(114): Drupal\\jsonapi\\Normalizer\\Value\\EntityNormalizerValue->rasterizeValue()\n
#4 /app/drupal/docroot/modules/contrib/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php(139): Drupal\\jsonapi\\Normalizer\\Value\\JsonApiDocumentTopLevelNormalizerValue->rasterizeValue()\n
#5 /app/drupal/vendor/symfony/serializer/Serializer.php(128): Drupal\\jsonapi\\Normalizer\\JsonApiDocumentTopLevelNormalizer->normalize(Object(Drupal\\jsonapi\\Resource\\JsonApiDocumentTopLevel), 'api_json', Array)\n
#6 /app/drupal/vendor/symfony/serializer/Serializer.php(101): Symfony\\Component\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\Resource\\JsonApiDocumentTopLevel), 'api_json', Array)\n
#7 /app/drupal/docroot/modules/contrib/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php(130): Symfony\\Component\\Serializer\\Serializer->serialize(Object(Drupal\\jsonapi\\Resource\\JsonApiDocumentTopLevel), 'api_json', Array)\n
#8 /app/drupal/docroot/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\\jsonapi\\EventSubscriber\\ResourceResponseSubscriber->Drupal\\jsonapi\\EventSubscriber\\{closure}()\n
#9 /app/drupal/docroot/modules/contrib/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php(131): Drupal\\Core\\Render\\Renderer->executeInRenderContext(Object(Drupal\\Core\\Render\\RenderContext), Object(Closure))\n
#10 /app/drupal/docroot/modules/contrib/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php(90): Drupal\\jsonapi\\EventSubscriber\\ResourceResponseSubscriber->renderResponseBody(Object(Symfony\\Component\\HttpFoundation\\Request), Object(Drupal\\jsonapi\\ResourceResponse), Object(Symfony\\Component\\Serializer\\Serializer), 'api_json')\n
#11 /app/drupal/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\\jsonapi\\EventSubscriber\\ResourceResponseSubscriber->onResponse(Object(Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent), 'kernel.response', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n
#12 /app/drupal/vendor/symfony/http-kernel/HttpKernel.php(184): Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->dispatch('kernel.response', Object(Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent))\n
#13 /app/drupal/vendor/symfony/http-kernel/HttpKernel.phpdrupal/vendor/symfony/http-kernel/HttpKernel.phpEvent\\FilterResponseEvent))\n
#13 /app/drupal/vendor/symfony/http-kernel/HttpKernel.php\HttpKernel\\Event\\FilterResponseEvent))\n
#13 /app/drupal/vendor/symfony/http-kernel/HttpKernel.phphp(184): Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->dispatch('kernel.response', Object(Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent))\n
#13 /app/drupal/vendor/symfony/http-kernel/HttpKernel.php13 /app/drupal/vendor/symfony/http-kernel/HttpKernel.php(166): Symfony\\Component\\HttpKernel\\HttpKernel->filterResponse(Object(Drupal\\jsonapi\\ResourceResponse), Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n
#14 /app/drupal/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n
#15 /app/drupal/docroot/modules/contrib/simple_oauth/src/HttpMiddleware/BasicAuthSwap.php(67): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#16 /app/drupal/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Drupal\\simple_oauth\\HttpMiddleware\\BasicAuthSwap->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#17 /app/drupal/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\\Core\\StackMiddleware\\Session->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#18 /app/drupal/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#19 /app/drupal/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\\page_cache\\StackMiddleware\\PageCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#20 /app/drupal/docroot/modules/contrib/jsonapi/src/StackMiddleware/FormatSetter.php(38): Drupal\\page_cache\\StackMiddleware\\PageCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#21 /app/drupal/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php(40): Drupal\\jsonapi\\StackMiddleware\\FormatSetter->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#22 /app/drupal/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Asm89\\Stack\\Cors->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#23 /app/drupal/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#24 /app/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#25 /app/drupal/docroot/core/lib/Drupal/Core/DrupalKernel.php(656): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
#26 /app/drupal/docroot/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n
#27 {main}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants