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

Delete 'Content model' Article breaks openapi/jsonapi #50

Open
spoetnik opened this issue Jul 6, 2017 · 2 comments
Open

Delete 'Content model' Article breaks openapi/jsonapi #50

spoetnik opened this issue Jul 6, 2017 · 2 comments

Comments

@spoetnik
Copy link

spoetnik commented Jul 6, 2017

Delete the Article node "Hello world!"
Delete the 'Content Model' Article.
Open the API documentation /admin/api
Error downloading openapi/jsonapi HTTP 500.
`1

Error: Call to a member function label() on null in Drupal\openapi\OpenApiGenerator\OpenApiJsonapiGenerator->getBundleTag() (line 332 of /Users/spoetnik/Projects/klaartje/reservoir/docroot/modules/contrib/openapi/src/OpenApiGenerator/OpenApiJsonapiGenerator.php) #0 /Users/spoetnik/Projects/klaartje/reservoir/docroot/modules/contrib/openapi/src/OpenApiGenerator/OpenApiJsonapiGenerator.php(43): Drupal\openapi\OpenApiGenerator\OpenApiJsonapiGenerator->getBundleTag('node', 'article') #1 /Users/spoetnik/Projects/klaartje/reservoir/docroot/modules/contrib/openapi/src/OpenApiGenerator/OpenApiGeneratorBase.php(91): Drupal\openapi\OpenApiGenerator\OpenApiJsonapiGenerator->getPaths(Array) #2 /Users/spoetnik/Projects/klaartje/reservoir/docroot/modules/contrib/openapi/src/Controller/ApiSpecificationControllerBase.php(50): Drupal\openapi\OpenApiGenerator\OpenApiGeneratorBase->getSpecification(Array) #3 [internal function]: Drupal\openapi\Controller\ApiSpecificationControllerBase->getSpecification() #4 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #5 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() #6 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #7 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #8 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() #9 /Users/spoetnik/Projects/klaartje/reservoir/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #10 /Users/spoetnik/Projects/klaartje/reservoir/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #11 /Users/spoetnik/Projects/klaartje/reservoir/docroot/modules/contrib/simple_oauth/src/HttpMiddleware/BasicAuthSwap.php(67): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #12 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /Users/spoetnik/Projects/klaartje/reservoir/docroot/modules/contrib/jsonapi/src/StackMiddleware/FormatSetter.php(38): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /Users/spoetnik/Projects/klaartje/reservoir/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php(40): Drupal\jsonapi\StackMiddleware\FormatSetter->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Asm89\Stack\Cors->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /Users/spoetnik/Projects/klaartje/reservoir/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /Users/spoetnik/Projects/klaartje/reservoir/docroot/core/lib/Drupal/Core/DrupalKernel.php(656): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /Users/spoetnik/Projects/klaartje/reservoir/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #23 /Users/spoetnik/.composer/vendor/drush/drush/commands/runserver/d8-rs-router.php(67): include('/Users/spoetnik...') #24 {main}.

`

@danepowell
Copy link

Related: #54

The article content type is really useful for demo purposes but needs to be able to be deleted.

@wimleers
Copy link
Member

This sounds like a bug in the https://www.drupal.org/project/openapi module. /cc @tedbow

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

No branches or pull requests

4 participants