netgen / media-site

Netgen Media Site (Powered by Netgen Layouts & eZ Platform)
https://netgen.io
Other
30 stars 10 forks source link

Argument '%argumentName%' is invalid: expected value to be of type #2

Closed kinjalgiri closed 6 years ago

kinjalgiri commented 6 years ago

Whenever I try to create an Article content type object and if try to add relation IDs for Author(ezobjectrelationlist), I am getting below error: InvalidArgumentType BadRequestHttpException

Argument '%argumentName%' is invalid: expected value to be of type 'Netgen\Bundle\SiteBundle\Core\FieldType\RelationList\Value', got 'eZ\Publish\Core\FieldType\RelationList\Value'

Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Argument '%argumentName%' is invalid: expected value to be of type 'Netgen\Bundle\SiteBundle\Core\FieldType\RelationList\Value', got 'eZ\Publish\Core\FieldType\RelationList\Value'

at vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/EventListener/ExceptionListener.php:54 at eZ\Bundle\EzPublishCoreBundle\EventListener\ExceptionListener->onKernelException(object(GetResponseForExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:104) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseForExceptionEvent), 'kernel.exception', object(ContainerAwareEventDispatcher)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:212) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(GetResponseForExceptionEvent)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:139) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent)) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:228) at Symfony\Component\HttpKernel\HttpKernel->handleException(object(InvalidArgumentType), object(Request), 1) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (web/app.php:55) at require('/home/ubuntu/workspace/media-site/web/app.php') (web/app_dev.php:22) at require('/home/ubuntu/workspace/media-site/web/app_dev.php') (vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Resources/router.php:42)

emodric commented 6 years ago

Hi @kinjalgiri !

I cannot reproduce this error. Can you give me the exact details where this error happens?

Thanks!

kinjalgiri commented 6 years ago

Thanks @emodric Please find the steps below: 1). Installed media-site with media-site-demo contents. 2). Login to admin site, 3). Create an Article 4). Try to add an Author in input box for author. I am trying to add Name but auto suggest is not appearing.

Even I tried editing an existing Article content type object but it is giving error while publishing/saving.

Issue is with 'ezobjectrelationlist' field type in any content types.

emodric commented 6 years ago

Thanks! I will investigate!

kinjalgiri commented 6 years ago

@emodric I was editing the contents via Platform UI http://127.0.0.1:8000/admin instead of Netgen Admin UI http://127.0.0.1:8000/ngadminui. That's where the confusion is.

I think Readme note should be updated for the same.

Thanks,

emodric commented 6 years ago

I have the hunch this is still the error caused by media site somehow, so I will try to fix it nevertheless!