Description
Steps to reproduce
- Magento 2.0.2
- Config -> Allow Guests to Write Reviews -> No
- Loggin in frontend
- Go to any product page with review
- Wait logout without refresh page
- Post a review
Expected result
- You need to log to post a review
Actual result
Report error
a:4:{i:0;s:181:"Notice: Undefined property: Magento\Review\Controller\Product\Post\Interceptor::$_reviewSession in /home/magento2/www/vendor/magento/module-review/Controller/Product.php on line 158";i:1;s:10084:"#0 /home/magento2/www/vendor/magento/module-review/Controller/Product.php(158): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined prope...', '/home/magento2/...', 158, Array) #1 [internal function]: Magento\Review\Controller\Product->dispatch(Object(Magento\Framework\App\Request\Http)) #2 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array) #3 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Review\Controller\Product\Post\Interceptor->___callParent('dispatch', Array) #4 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Review\...', 'dispatch', Object(Magento\Review\Controller\Product\Post\Interceptor), Array, 'designLoader') #5 /home/magento2/www/vendor/magento/framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #6 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\Review\Controller\Product\Post\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #7 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #8 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Review\...', 'dispatch', Object(Magento\Review\Controller\Product\Post\Interceptor), Array, 'contextPlugin') #9 /home/magento2/www/vendor/magento/module-store/App/Action/Plugin/Context.php(98): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #10 [internal function]: Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Review\Controller\Product\Post\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #11 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #12 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Review\...', 'dispatch', Object(Magento\Review\Controller\Product\Post\Interceptor), Array, 'storeCheck') #13 /home/magento2/www/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #14 [internal function]: Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Review\Controller\Product\Post\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #15 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #16 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Review\...', 'dispatch', Object(Magento\Review\Controller\Product\Post\Interceptor), Array, 'customer-app-ac...') #17 /home/magento2/www/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #18 [internal function]: Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Review\Controller\Product\Post\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #19 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #20 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Review\...', 'dispatch', Object(Magento\Review\Controller\Product\Post\Interceptor), Array, 'tax-app-action-...') #21 /home/magento2/www/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #22 [internal function]: Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Review\Controller\Product\Post\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #23 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #24 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Review\...', 'dispatch', Object(Magento\Review\Controller\Product\Post\Interceptor), Array, 'weee-app-action...') #25 /home/magento2/www/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Review\Controller\Product\Post\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http)) #26 [internal function]: Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Review\Controller\Product\Post\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #27 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array) #28 /home/magento2/www/var/generation/Magento/Review/Controller/Product/Post/Interceptor.php(39): Magento\Review\Controller\Product\Post\Interceptor->___callPlugins('dispatch', Array, Array) #29 /home/magento2/www/vendor/magento/framework/App/FrontController.php(55): Magento\Review\Controller\Product\Post\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #30 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http)) #31 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array) #32 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array) #33 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...') #34 /home/magento2/www/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(89): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #35 [internal function]: Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #36 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #37 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install') #38 /home/magento2/www/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #39 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #40 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #41 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...') #42 /home/magento2/www/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #43 [internal function]: Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #44 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #45 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...') #46 /home/magento2/www/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http)) #47 [internal function]: Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #48 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array) #49 /home/magento2/www/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array) #50 /home/magento2/www/vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #51 /home/magento2/www/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() #52 /home/magento2/www/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #53 {main}";s:3:"url";s:29:"/review/product/post/id/1102/";s:11:"script_name";s:10:"/index.php";}