Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-5387

REST API ContentTypeList returns error for ContentType company

    XMLWordPrintable

Details

    • Yes

    Description

      Steps to reproduce:

      Result:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <ErrorMessage media-type="application/vnd.ibexa.api.ErrorMessage+xml">
      
          <errorCode>404</errorCode>
      
          <errorMessage>Not Found</errorMessage>
      
          <errorDescription>Could not find 'location' with identifier '-1'</errorDescription>
      
          <trace>#0 /app/ezplatform/vendor/ibexa/core/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php(46): Ibexa\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase->getBasicNodeData(-1, Array, true)
      
      #1 /app/ezplatform/vendor/ibexa/core/src/lib/Persistence/Legacy/Content/TreeHandler.php(167): Ibexa\Core\Persistence\Legacy\Content\Location\Gateway\ExceptionConversion->getBasicNodeData(-1, Array, true)
      
      #2 /app/ezplatform/vendor/ibexa/core/src/lib/Persistence/Legacy/Content/Location/Handler.php(94): Ibexa\Core\Persistence\Legacy\Content\TreeHandler->loadLocation(-1, Array, true)
      
      #3 /app/ezplatform/var/cache/dev/ContainerNPxvIrp/Handler_6db946d.php(29): Ibexa\Core\Persistence\Legacy\Content\Location\Handler->load(-1, Array, true)
      
      #4 /app/ezplatform/vendor/ibexa/core/src/lib/Persistence/Cache/LocationHandler.php(72): ContainerNPxvIrp\Handler_6db946d->load(-1, Array, true)
      
      #5 /app/ezplatform/vendor/ibexa/core/src/lib/Persistence/Cache/AbstractInMemoryHandler.php(101): Ibexa\Core\Persistence\Cache\LocationHandler->Ibexa\Core\Persistence\Cache\{closure}(-1)
      
      #6 /app/ezplatform/vendor/ibexa/core/src/lib/Persistence/Cache/LocationHandler.php(79): Ibexa\Core\Persistence\Cache\AbstractInMemoryHandler->getCacheValue(-1, 'ibx-l-', Object(Closure), Object(Closure), Object(Closure), '-1', Array)
      
      #7 /app/ezplatform/vendor/ibexa/core/src/lib/Repository/LocationService.php(191): Ibexa\Core\Persistence\Cache\LocationHandler->load(-1, Array, true)
      
      #8 /app/ezplatform/var/cache/dev/ContainerNPxvIrp/LocationService_770eb8d.php(36): Ibexa\Core\Repository\LocationService->loadLocation(-1, Array, true)
      
      #9 /app/ezplatform/vendor/ibexa/core/src/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationService.php(42): ContainerNPxvIrp\LocationService_770eb8d->loadLocation(-1, Array, true)
      
      #10 /app/ezplatform/vendor/ibexa/core/src/contracts/Repository/Decorator/LocationServiceDecorator.php(42): Ibexa\Core\Repository\Mapper\ContentLocationMapper\DecoratedLocationService->loadLocation(-1, Array, true)
      
      #11 /app/ezplatform/vendor/ibexa/core/src/lib/Repository/SiteAccessAware/LocationService.php(58): Ibexa\Contracts\Core\Repository\Decorator\LocationServiceDecorator->loadLocation(-1, Array, true)
      
      #12 /app/ezplatform/vendor/ibexa/rest/src/lib/FieldTypeProcessor/BaseRelationProcessor.php(68): Ibexa\Core\Repository\SiteAccessAware\LocationService->loadLocation(-1)
      
      #13 /app/ezplatform/vendor/ibexa/rest/src/lib/FieldTypeProcessor/RelationProcessor.php(37): Ibexa\Rest\FieldTypeProcessor\BaseRelationProcessor->mapToLocationHref(-1)
      
      #14 /app/ezplatform/vendor/ibexa/rest/src/lib/Output/FieldTypeSerializer.php(94): Ibexa\Rest\FieldTypeProcessor\RelationProcessor->postProcessFieldSettingsHash(Array)
      
      #15 /app/ezplatform/vendor/ibexa/rest/src/lib/Server/Output/ValueObjectVisitor/RestFieldDefinition.php(125): Ibexa\Rest\Output\FieldTypeSerializer->serializeFieldSettings(Object(Ibexa\Rest\Output\Generator\Xml), 'ezobjectrelatio...', Array)
      
      #16 /app/ezplatform/vendor/ibexa/rest/src/contracts/Output/ValueObjectVisitorDispatcher.php(74): Ibexa\Rest\Server\Output\ValueObjectVisitor\RestFieldDefinition->visit(Object(Ibexa\Contracts\Rest\Output\Visitor), Object(Ibexa\Rest\Output\Generator\Xml), Object(Ibexa\Rest\Server\Values\RestFieldDefinition))
      
      #17 /app/ezplatform/vendor/ibexa/rest/src/contracts/Output/Visitor.php(138): Ibexa\Contracts\Rest\Output\ValueObjectVisitorDispatcher->visit(Object(Ibexa\Rest\Server\Values\RestFieldDefinition))
      
      #18 /app/ezplatform/vendor/ibexa/rest/src/lib/Server/Output/ValueObjectVisitor/FieldDefinitionList.php(51): Ibexa\Contracts\Rest\Output\Visitor->visitValueObject(Object(Ibexa\Rest\Server\Values\RestFieldDefinition))
      
      #19 /app/ezplatform/vendor/ibexa/rest/src/contracts/Output/ValueObjectVisitorDispatcher.php(74): Ibexa\Rest\Server\Output\ValueObjectVisitor\FieldDefinitionList->visit(Object(Ibexa\Contracts\Rest\Output\Visitor), Object(Ibexa\Rest\Output\Generator\Xml), Object(Ibexa\Rest\Server\Values\FieldDefinitionList))
      
      #20 /app/ezplatform/vendor/ibexa/rest/src/contracts/Output/Visitor.php(138): Ibexa\Contracts\Rest\Output\ValueObjectVisitorDispatcher->visit(Object(Ibexa\Rest\Server\Values\FieldDefinitionList))
      
      #21 /app/ezplatform/vendor/ibexa/rest/src/lib/Server/Output/ValueObjectVisitor/RestContentType.php(152): Ibexa\Contracts\Rest\Output\Visitor->visitValueObject(Object(Ibexa\Rest\Server\Values\FieldDefinitionList))
      
      #22 /app/ezplatform/vendor/ibexa/rest/src/contracts/Output/ValueObjectVisitorDispatcher.php(74): Ibexa\Rest\Server\Output\ValueObjectVisitor\RestContentType->visit(Object(Ibexa\Contracts\Rest\Output\Visitor), Object(Ibexa\Rest\Output\Generator\Xml), Object(Ibexa\Rest\Server\Values\RestContentType))
      
      #23 /app/ezplatform/vendor/ibexa/rest/src/contracts/Output/Visitor.php(138): Ibexa\Contracts\Rest\Output\ValueObjectVisitorDispatcher->visit(Object(Ibexa\Rest\Server\Values\RestContentType))
      
      #24 /app/ezplatform/vendor/ibexa/rest/src/lib/Server/Output/ValueObjectVisitor/ContentTypeList.php(41): Ibexa\Contracts\Rest\Output\Visitor->visitValueObject(Object(Ibexa\Rest\Server\Values\RestContentType))
      
      #25 /app/ezplatform/vendor/ibexa/rest/src/contracts/Output/ValueObjectVisitorDispatcher.php(74): Ibexa\Rest\Server\Output\ValueObjectVisitor\ContentTypeList->visit(Object(Ibexa\Contracts\Rest\Output\Visitor), Object(Ibexa\Rest\Output\Generator\Xml), Object(Ibexa\Rest\Server\Values\ContentTypeList))
      
      #26 /app/ezplatform/vendor/ibexa/rest/src/contracts/Output/Visitor.php(138): Ibexa\Contracts\Rest\Output\ValueObjectVisitorDispatcher->visit(Object(Ibexa\Rest\Server\Values\ContentTypeList))
      
      #27 /app/ezplatform/vendor/ibexa/rest/src/contracts/Output/Visitor.php(100): Ibexa\Contracts\Rest\Output\Visitor->visitValueObject(Object(Ibexa\Rest\Server\Values\ContentTypeList))
      
      #28 /app/ezplatform/vendor/ibexa/rest/src/lib/Server/View/AcceptHeaderVisitorDispatcher.php(53): Ibexa\Contracts\Rest\Output\Visitor->visit(Object(Ibexa\Rest\Server\Values\ContentTypeList))
      
      #29 /app/ezplatform/vendor/ibexa/rest/src/bundle/EventListener/ResponseListener.php(66): Ibexa\Rest\Server\View\AcceptHeaderVisitorDispatcher->dispatch(Object(Symfony\Component\HttpFoundation\Request), Object(Ibexa\Rest\Server\Values\ContentTypeList))
      
      #30 /app/ezplatform/vendor/symfony/event-dispatcher/Debug/WrappedListener.php(117): Ibexa\Bundle\Rest\EventListener\ResponseListener->onKernelResultView(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher))
      
      #31 /app/ezplatform/vendor/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher))
      
      #32 /app/ezplatform/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'kernel.view', Object(Symfony\Component\HttpKernel\Event\ViewEvent))
      
      #33 /app/ezplatform/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php(154): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
      
      #34 /app/ezplatform/vendor/symfony/http-kernel/HttpKernel.php(168): Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
      
      #35 /app/ezplatform/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
      
      #36 /app/ezplatform/vendor/symfony/http-kernel/Kernel.php(202): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      
      #37 /app/ezplatform/public/index.php(41): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
      
      #38 {main}</trace>
      
          <file>/app/ezplatform/vendor/ibexa/core/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php</file>
      
          <line>83</line>
      
      </ErrorMessage>

      Expected results:
      You get the company content type information.
       

      Note:

      Works fine with header: Accept:application/vnd.ibexa.api.ContentTypeInfoList+xml

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              pawel.pawlik@ibexa.co Paweł Pawlik
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: