magefan / module-blog

Magento 2 Blog Extension is a solution that helps you to create a blog on Magento and manage posts,categories, tags, authors, and comments.
https://magefan.com/magento2-blog-extension
Other
265 stars 136 forks source link

Class Magefan\Blog\Block\Adminhtml\Edit\BackButton does not exist #221

Closed r0umi closed 5 years ago

r0umi commented 5 years ago

configuration : Magento enterprise 2.2.2 Magefan blog 2.8.6 infrastructure : magento cloud

step to reproduce : Go to backoffice > content > Blog > Posts and click "add new post"

result : Something went wrong while saving this post. Class Magefan\Blog\Block\Adminhtml\Edit\BackButton does not exist

expected : the form to add a new post.

stacktrace : report.CRITICAL: Exception message: Class Magefan\Blog\Block\Adminhtml\Edit\BackButton does not exist Trace: #0 /var/www/html/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magefan\Blog\Bl...')

1 /var/www/html/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magefan\Blog\Bl...')

2 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magefan\Blog\Bl...')

3 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magefan\Blog\Bl...', Array)

4 /var/www/html/vendor/magento/framework/View/Element/UiComponent/Control/ButtonProviderFactory.php(39): Magento\Framework\ObjectManager\ObjectManager->create('Magefan\Blog\Bl...', Array)

5 /var/www/html/vendor/magento/framework/View/Element/UiComponent/Context.php(267): Magento\Framework\View\Element\UiComponent\Control\ButtonProviderFactory->create('Magefan\Blog\Bl...')

6 /var/www/html/vendor/magento/module-ui/Component/AbstractComponent.php(116): Magento\Framework\View\Element\UiComponent\Context->addButtons(Array, Object(Magento\Ui\Component\Form))

7 /var/www/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(159): Magento\Ui\Component\AbstractComponent->prepare()

8 /var/www/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(137): Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(Object(Magento\Ui\Component\Form))

9 /var/www/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(97): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'blog_post_form', Array, Object(Magento\Framework\View\Layout\Interceptor))

10 /var/www/html/vendor/magento/framework/View/Layout/GeneratorPool.php(80): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))

11 /var/www/html/vendor/magento/framework/View/Layout.php(344): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))

12 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(89): Magento\Framework\View\Layout->generateElements()

13 /var/www/html/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()

14 /var/www/html/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()

15 /var/www/html/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()

16 /var/www/html/vendor/magento/framework/View/Page/Config.php(197): Magento\Framework\View\Layout\Builder->build()

17 /var/www/html/vendor/magento/framework/View/Page/Config.php(207): Magento\Framework\View\Page\Config->build()

18 /var/www/html/vendor/magento/framework/App/View.php(170): Magento\Framework\View\Page\Config->publicBuild()

19 /var/www/html/vendor/magento/framework/App/View.php(114): Magento\Framework\App\View->loadLayoutUpdates()

20 /var/www/html/vendor/magefan/module-community/Controller/Adminhtml/Actions.php(166): Magento\Framework\App\View->loadLayout()

21 /var/www/html/generated/code/Magefan/Blog/Controller/Adminhtml/Post/Edit/Interceptor.php(37): Magefan\Community\Controller\Adminhtml\Actions->_editAction()

22 /var/www/html/vendor/magefan/module-community/Controller/Adminhtml/Actions.php(108): Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->_editAction()

23 /var/www/html/generated/code/Magefan/Blog/Controller/Adminhtml/Post/Edit/Interceptor.php(24): Magefan\Community\Controller\Adminhtml\Actions->execute()

24 /var/www/html/vendor/magento/framework/App/Action/Action.php(107): Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->execute()

25 /var/www/html/vendor/magento/module-backend/App/AbstractAction.php(229): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

26 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))

27 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->___callParent('dispatch', Array)

28 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

29 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

30 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

31 /var/www/html/generated/code/Magefan/Blog/Controller/Adminhtml/Post/Edit/Interceptor.php(65): Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->___callPlugins('dispatch', Array, NULL)

32 /var/www/html/vendor/magento/framework/App/FrontController.php(55): Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

33 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

34 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

35 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

36 /var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)

37 /var/www/html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

38 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()

39 /var/www/html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()

40 /var/www/html/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

41 {main}

magefan commented 5 years ago

@r0umi , thank you for your report. Please make sure that you use the official release of the Magento 2 blog extension by Magefan also the problem can be in some module that extends Magefan blog.

We have checked our code base https://github.com/magefan/module-blog/search?q=BackButton&unscoped_q=BackButton and we can find BackButton only in the UI component XML, but it is actually Magefan\Community\Block\Adminhtml\Edit\BackButton and not Magefan\Blog\Block\Adminhtml\Edit\BackButton

So I recommend you to check your code and replace Magefan\Blog\Block\Adminhtml\Edit\BackButton with Magefan\Community\Block\Adminhtml\Edit\BackButton

r0umi commented 5 years ago

Hello,

This issue comes from an override in our code. Thank you for the reply and sorry for the disruption.

You can close this ticket. Regards, Romain

magefan commented 5 years ago

Hello @r0umi, thank you for let us know. Was our Blog extension useful for you? Hope you are happy with it. Could I ask you please to leave a GitHub star and an honest review about the module on our website? https://magefan.com/magento2-blog-extension