magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Enabling Dashboard Chart from admin causes exception in opening admin-dashboard.

Open aniket-rokade opened this issue 10 years ago • 4 comments

Whenever I enable Dashboard Chart from admin->Store->configuration, admin dashboard page does not work. It gives exception.

I tried below things to resolve it but to no help:

  1. Created Cron job as described in below dev doc: http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html

  2. Changed parameter group setting of my RDS instance to ignore super user access to database: by setting value of log_bin_trust_function_creators to 1. (This is because when I tried to change indexer-mode to 'schedule' from 'save' it gave me error for not having super user access.) ** Exception details displayed instead of dashboard page:**

Notice: Undefined property: Magento\Backend\Helper\Dashboard\Order::$_storeManager in /var/www/html/magento2/app/code/Magento/Backend/Helper/Dashboard/Order.php on line 52 #0 /var/www/html/magento2/app/code/Magento/Backend/Helper/Dashboard/Order.php(52): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined prope...', '/var/www/html/k...', 52, Array) #1 /var/www/html/magento2/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php(33): Magento\Backend\Helper\Dashboard\Order->_initCollection() #2 /var/www/html/magento2/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php(50): Magento\Backend\Helper\Dashboard\AbstractDashboard->getCollection() #3 /var/www/html/magento2/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php(58): Magento\Backend\Helper\Dashboard\AbstractDashboard->getItems() #4 /var/www/html/magento2/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php(55): Magento\Backend\Helper\Dashboard\AbstractDashboard->getCount() #5 /var/www/html/magento2/app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml(26): Magento\Backend\Block\Dashboard\AbstractDashboard->getCount() #6 /var/www/html/magento2/lib/internal/Magento/Framework/View/TemplateEngine/Php.php(59): include('/var/www/html/k...') #7 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Backend\Block\Dashboard\Tab\Orders), '/var/www/html/k...', Array) #8 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/Template.php(279): Magento\Framework\View\Element\Template->fetchView('/var/www/html/k...') #9 /var/www/html/magento2/app/code/Magento/Backend/Block/Template.php(104): Magento\Framework\View\Element\Template->_toHtml() #10 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(657): Magento\Backend\Block\Template->_toHtml() #11 /var/www/html/magento2/app/code/Magento/Backend/Block/Dashboard/Diagrams.php(39): Magento\Framework\View\Element\AbstractBlock->toHtml() #12 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(262): Magento\Backend\Block\Dashboard\Diagrams->_prepareLayout() #13 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(744): Magento\Framework\View\Element\AbstractBlock->setLayout(Object(Magento\Framework\View\Layout\Interceptor)) #14 /var/www/html/magento2/app/code/Magento/Backend/Block/Dashboard.php(39): Magento\Framework\View\Layout->createBlock('Magento\Backend...') #15 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(262): Magento\Backend\Block\Dashboard->_prepareLayout() #16 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout/Generator/Block.php(139): Magento\Framework\View\Element\AbstractBlock->setLayout(Object(Magento\Framework\View\Layout\Interceptor)) #17 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php(86): Magento\Framework\View\Layout\Generator\Block->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context)) #18 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(327): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context)) #19 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout->generateElements() #20 /var/www/html/magento2/lib/internal/Magento/Framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks() #21 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks() #22 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(244): Magento\Framework\View\Layout\Builder->build() #23 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(859): Magento\Framework\View\Layout->build() #24 /var/www/html/magento2/app/code/Magento/Backend/Model/View/Result/Page.php(59): Magento\Framework\View\Layout->getBlock('menu') #25 /var/www/html/magento2/app/code/Magento/Backend/Controller/Adminhtml/Dashboard/Index.php(35): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Backend...') #26 /var/www/html/magento2/lib/internal/Magento/Framework/App/Action/Action.php(102): Magento\Backend\Controller\Adminhtml\Dashboard\Index->execute() #27 /var/www/html/magento2/app/code/Magento/Backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http)) #28 [internal function]: Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http)) #29 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array) #30 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(70): Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor->___callParent('dispatch', Array) #31 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor), Array, 'adminAuthentica...') #32 /var/www/html/magento2/app/code/Magento/Backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #33 [internal function]: Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #34 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array) #35 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor), Array, 'adminMassaction...') #36 /var/www/html/magento2/app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php(33): Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http)) #37 [internal function]: Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #38 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(140): call_user_func_array(Array, Array) #39 /var/www/html/magento2/var/generation/Magento/Backend/Controller/Adminhtml/Dashboard/Index/Interceptor.php(26): Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor->___callPlugins('dispatch', Array, Array) #40 /var/www/html/magento2/lib/internal/Magento/Framework/App/FrontController.php(55): Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #41 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http)) #42 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array) #43 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array) #44 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install') #45 /var/www/html/magento2/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http)) #46 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #47 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(140): call_user_func_array(Array, Array) #48 /var/www/html/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array) #49 /var/www/html/magento2/lib/internal/Magento/Framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #50 /var/www/html/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() #51 /var/www/html/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #52 {main}

aniket-rokade avatar Feb 21 '16 15:02 aniket-rokade

I'm having the same problem. Clean install is fine but after I went through the Magento Migration, this error started to appear. Disabling the chart helps.

PingusPepan avatar Mar 10 '16 07:03 PingusPepan

Same here.

peterjaap avatar Apr 09 '16 09:04 peterjaap

Hello @aniket-rokade

To allow us to research the issue, please, provide description according to the template. Also please, provide the used version. If the problem is actual for a specific tag, please, specify it and be sure that the latest update was used.

duhon avatar Jun 22 '16 16:06 duhon

According to contributor guide, tickets without response for two weeks should be closed. Please feel free to reopen if it's needed.

palamar avatar Jul 07 '16 15:07 palamar