Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create a Report - Best Sellers Exception Error in pt_BR locate #9432

Closed
marcosdsdba opened this issue Apr 27, 2017 · 1 comment
Closed

Comments

@marcosdsdba
Copy link

marcosdsdba commented Apr 27, 2017

  1. Magento Version 2.1.5 and 2.1.6

  2. Admin >Reports > Products > Best Sellers (report_sales/bestsellers)

  3. Brazilian Currency and Datetime formats ( DD-MM-YYYY)
    Steps to reproduce

  4. Login in Admin Store

  5. Select Reports and navigate to Products and select Best Sellers

  6. Insert any date an on any field and click in Show Report

When I try to extract a report of any type and date it returns the error:

"error inside log report : (927342175463 number Dynamically generated in var/report/)"

a:4:{i:0;s:38:"Invalid input date format '27/04/2017'";i:1;s:5672:"#0 /var/www/html/vendor/magento/zendframework1/library/Zend/Filter.php(114): Magento\Framework\Stdlib\DateTime\Filter\Date->filter('27/04/2017')
#1 /var/www/html/vendor/magento/zendframework1/library/Zend/Filter/Input.php(722): Zend_Filter->filter('27/04/2017')
#2 /var/www/html/vendor/magento/zendframework1/library/Zend/Filter/Input.php(701): Zend_Filter_Input->_filterRule(Array)
#3 /var/www/html/vendor/magento/zendframework1/library/Zend/Filter/Input.php(785): Zend_Filter_Input->_filter()
#4 /var/www/html/vendor/magento/zendframework1/library/Zend/Filter/Input.php(381): Zend_Filter_Input->_process()
#5 /var/www/html/vendor/magento/module-reports/Controller/Adminhtml/Report/AbstractReport.php(105): Zend_Filter_Input->getUnescaped()
#6 /var/www/html/var/generation/Magento/Reports/Controller/Adminhtml/Report/Sales/Bestsellers/Interceptor.php(50): Magento\Reports\Controller\Adminhtml\Report\AbstractReport->_initReportAction(Array)
#7 /var/www/html/vendor/magento/module-reports/Controller/Adminhtml/Report/Sales/Bestsellers.php(33): Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor->_initReportAction(Array)
#8 /var/www/html/var/generation/Magento/Reports/Controller/Adminhtml/Report/Sales/Bestsellers/Interceptor.php(24): Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers->execute()
#9 /var/www/html/vendor/magento/framework/App/Action/Action.php(102): Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor->execute()
#10 /var/www/html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#11 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#12 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor->___callParent('dispatch', Array)
#13 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Reports...', 'dispatch', Object(Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor), Array, 'adminAuthentica...')
#14 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#15 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#16 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Reports...', 'dispatch', Object(Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor), Array, 'adminMassaction...')
#17 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#18 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#19 /var/www/html/var/generation/Magento/Reports/Controller/Adminhtml/Report/Sales/Bestsellers/Interceptor.php(65): Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor->___callPlugins('dispatch', Array, Array)
#20 /var/www/html/vendor/magento/framework/App/FrontController.php(55): Magento\Reports\Controller\Adminhtml\Report\Sales\Bestsellers\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#23 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#24 /var/www/html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#25 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#26 /var/www/html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#27 /var/www/html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#28 /var/www/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#29 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#30 {main}";s:3:"url";s:213:"/admin/reports/report_sales/bestsellers/key/b39276259d94f9a7e1e68a86822ba277c4f8dc965ccf138716b75f5b276641b2/filter/cGVyaW9kX3R5cGU9ZGF5JmZyb209MDElMkYwNCUyRjIwMTcmdG89MjclMkYwNCUyRjIwMTcmc2hvd19lbXB0eV9yb3dzPTA=/";s:11:"script_name";s:10:"/index.php";}

@marcosdsdba marcosdsdba changed the title Report Bestsellers Exception Error Report Best Sellers Exception Error Apr 27, 2017
@marcosdsdba marcosdsdba changed the title Report Best Sellers Exception Error Unable to create a Report - Best Sellers Exception Error Apr 27, 2017
@marcosdsdba marcosdsdba changed the title Unable to create a Report - Best Sellers Exception Error Unable to create a Report - Best Sellers Exception Error in pt_BR locate Apr 27, 2017
@marcosdsdba
Copy link
Author

marcosdsdba commented May 2, 2017

I solved the problem by overwriting the class, creating a separate module and injecting as "prefer" from the Magento Class to the Class I created by overwriting as needed.

Anyone who wants to use the solution is available on Github:
https://github.com/MattBidas/magento2-reports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant