Smile-SA / magento2-module-custom-entity

36 stars 10 forks source link

Error using multiselect attribute. #32

Closed francescorm closed 2 years ago

francescorm commented 2 years ago

When you add multiselect attribute and try to open an entity you will receive this error

1 exception(s): Exception #0 (ReflectionException): Class does not exist

Exception #0 (ReflectionException): Class does not exist

#1 Magento\Framework\Code\Reader\ClassReader->getConstructor() called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:54]
#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:48]
#3 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#4 Magento\Framework\ObjectManager\ObjectManager->create() called at [vendor/magento/framework/Validator/UniversalFactory.php:36]
#5 Magento\Framework\Validator\UniversalFactory->create() called at [vendor/magento/module-eav/Model/Entity/Attribute/AbstractAttribute.php:642]
#6 Magento\Eav\Model\Entity\Attribute\AbstractAttribute->getSource() called at [app/code/Smile/ScopedEav/Ui/DataProvider/Entity/Form/Modifier/Eav.php:273]
#7 Smile\ScopedEav\Ui\DataProvider\Entity\Form\Modifier\Eav->setupAttributeMeta() called at [app/code/Smile/ScopedEav/Ui/DataProvider/Entity/Form/Modifier/Eav.php:237]
#8 Smile\ScopedEav\Ui\DataProvider\Entity\Form\Modifier\Eav->getContainerChildren() called at [app/code/Smile/ScopedEav/Ui/DataProvider/Entity/Form/Modifier/Eav.php:213]
#9 Smile\ScopedEav\Ui\DataProvider\Entity\Form\Modifier\Eav->addContainerChildren() called at [app/code/Smile/ScopedEav/Ui/DataProvider/Entity/Form/Modifier/Eav.php:414]
#10 Smile\ScopedEav\Ui\DataProvider\Entity\Form\Modifier\Eav->getAttributesMeta() called at [app/code/Smile/ScopedEav/Ui/DataProvider/Entity/Form/Modifier/Eav.php:155]
#11 Smile\ScopedEav\Ui\DataProvider\Entity\Form\Modifier\Eav->modifyMeta() called at [app/code/Smile/ScopedEav/Ui/DataProvider/Entity/Form/EntityDataProvider.php:74]
#12 Smile\ScopedEav\Ui\DataProvider\Entity\Form\EntityDataProvider->getMeta() called at [vendor/magento/framework/View/Element/UiComponentFactory.php:330]
#13 Magento\Framework\View\Element\UiComponentFactory->mergeMetadata() called at [vendor/magento/framework/View/Element/UiComponentFactory.php:231]
#14 Magento\Framework\View\Element\UiComponentFactory->create() called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:140]
#15 Magento\Framework\View\Layout\Generator\UiComponent->generateComponent() called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:103]
#16 Magento\Framework\View\Layout\Generator\UiComponent->process() called at [vendor/magento/framework/View/Layout/GeneratorPool.php:93]
#17 Magento\Framework\View\Layout\GeneratorPool->process() called at [vendor/magento/framework/View/Layout.php:365]
#18 Magento\Framework\View\Layout->generateElements() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:68]
#19 Magento\Framework\View\Layout\Interceptor->generateElements() called at [vendor/magento/framework/View/Layout/Builder.php:129]
#20 Magento\Framework\View\Layout\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Page/Builder.php:65]
#21 Magento\Framework\View\Page\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Layout/Builder.php:65]
#22 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Layout.php:271]
#23 Magento\Framework\View\Layout->build() called at [vendor/magento/framework/View/Layout.php:896]
#24 Magento\Framework\View\Layout->getBlock() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:293]
#25 Magento\Framework\View\Layout\Interceptor->getBlock() called at [vendor/magento/module-backend/Model/View/Result/Page.php:47]
#26 Magento\Backend\Model\View\Result\Page->addBreadcrumb() called at [generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php:32]
#27 Magento\Backend\Model\View\Result\Page\Interceptor->addBreadcrumb() called at [app/code/Smile/ScopedEav/Controller/Adminhtml/AbstractEntity.php:67]
#28 Smile\ScopedEav\Controller\Adminhtml\AbstractEntity->createActionPage() called at [app/code/Smile/ScopedEav/Controller/Adminhtml/Entity/NewAction.php:37]
#29 Smile\ScopedEav\Controller\Adminhtml\Entity\NewAction->execute() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#30 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#31 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php:51]
#32 Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin->aroundExecute() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#33 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#34 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->___callPlugins() called at [generated/code/Smile/CustomEntity/Controller/Adminhtml/Entity/NewAction/Interceptor.php:23]
#35 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:111]
#36 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/module-backend/App/AbstractAction.php:151]
#37 Magento\Backend\App\AbstractAction->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#38 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#39 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
#40 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#41 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#42 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->___callPlugins() called at [generated/code/Smile/CustomEntity/Controller/Adminhtml/Entity/NewAction/Interceptor.php:32]
#43 Smile\CustomEntity\Controller\Adminhtml\Entity\NewAction\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:186]
#44 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:118]
#45 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#46 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#47 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#48 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23]
#49 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#50 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#51 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#52 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:29]
jublm commented 2 years ago

I'm having the same problem. Did you find a fix for this?

francescorm commented 2 years ago

Hi there, no i'm sorry but i have plan to check it.

On 27/01/22 08:21, jubalin wrote:

I'm having the same problem. Did you find a fix for this?

— Reply to this email directly, view it on GitHub https://github.com/Smile-SA/magento2-module-custom-entity/issues/32#issuecomment-1022917163, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNDETTAAGENGG6UARWM4BLUYDW7BANCNFSM5IY2UYHQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

jublm commented 2 years ago

I got a fix for this. I've overridden \Smile\ScopedEav\Ui\DataProvider\Entity\Form\Modifier\Eav in a custom module until the module is updated, it'w working fine. This is my fix:

`<?php

namespace W2e\SmileEntityOverride\Ui\DataProvider\Entity\Form\Modifier;

use Magento\Catalog\Model\Category\FileInfo; use Magento\Catalog\Model\ResourceModel\Eav\Attribute as EavAttribute; use Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory as EavAttributeFactory; use Magento\Ui\Component\Form\Element\Wysiwyg as WysiwygElement; use Magento\Ui\Component\Form\Field; use Smile\ScopedEav\Api\Data\AttributeInterface;

class Eav extends \Smile\ScopedEav\Ui\DataProvider\Entity\Form\Modifier\Eav { /**

cemag44300 commented 2 years ago

Thank you @jublm i will push a new release this morning

cemag44300 commented 2 years ago

https://github.com/Smile-SA/magento2-module-scoped-eav/releases/tag/1.3.5