i'm trying to display messages from flashMessenger in view file.
Add them in controller
$status = 'error';
$message = 'Wrong parameters';
$this->flashMessenger()->addMessage($message)->setNamespace($status);
Tried to get messages in .phtml file :
1) Like this $this->flashMessenger()->getPluginFlashMessenger()->getCurrentErrorMessages();
2) Like this
$flash = $this->flashMessenger();
if (count($flash->getMessages())) {
$flash->render('error');
}
And always receive same error Session validation failed
Call stack:
#0 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/Session/AbstractContainer.php(78): Zend\Session\SessionManager->start()
#1 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php(120): Zend\Session\AbstractContainer->__construct('FlashMessenger', Object(Zend\Session\SessionManager))
#2 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php(447): Zend\Mvc\Controller\Plugin\FlashMessenger->getContainer()
#3 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php(525): Zend\Mvc\Controller\Plugin\FlashMessenger->hasCurrentMessages()
#4 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php(593): Zend\Mvc\Controller\Plugin\FlashMessenger->getCurrentMessages()
#5 /home/dmitriy/zend/module/Admin/view/admin/category/index.phtml(20): Zend\Mvc\Controller\Plugin\FlashMessenger->getCurrentErrorMessages()
#6 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php(506): include('/home/dmitriy/z...')
#7 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/View/View.php(205): Zend\View\Renderer\PhpRenderer->render(Object(Zend\View\Model\ViewModel))
#8 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/View/View.php(233): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#9 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/View/View.php(198): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))
#10 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/Mvc/View/Http/DefaultRenderingStrategy.php(102): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#11 [internal function]: Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#12 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('render', Object(Zend\Mvc\MvcEvent), Array)
#14 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(355): Zend\EventManager\EventManager->trigger('render', Object(Zend\Mvc\MvcEvent))
#15 /home/dmitriy/zend/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(330): Zend\Mvc\Application->completeRequest(Object(Zend\Mvc\MvcEvent))
#16 /home/dmitriy/zend/public/index.php(24): Zend\Mvc\Application->run()
#17 {main}
Zend crushing before displaying in view file. Here addMessage($message)
I fixed it by adding "session_start ();" at the beginning of the containers
Related
I am trying to do log output to a file in parallel in the Dart language but I get the following error I can't read from the error at all what the error means, does anyone know a solution?
Invalid argument(s): Illegal argument in isolate message: (object extends NativeWrapper - Library:'dart:io' Class: _RandomAccessFileOpsImpl#14069316)
#0 Isolate._spawnFunction (dart:isolate-patch/isolate_patch.dart:395:25)
#1 Isolate.spawn (dart:isolate-patch/isolate_patch.dart:375:7)
#2 _IsolateThread._startImpl (package:async_task/src/async_task_isolate.dart:457:19)
#3 _IsolateThread._start (package:async_task/src/async_task_isolate.dart:445:12)
#4 _AsyncExecutorMultiThread._catchNotFreeThread (package:async_task/src/async_task_isolate.dart:133:24)
#5 _AsyncExecutorMultiThread._catchThread (package:async_task/src/async_task_isolate.dart:125:12)
#6 _AsyncExecutorMultiThread._dispatchTask (package:async_task/src/async_task_isolate.dart:198:18)
#7 _AsyncExecutorMultiThread.execute (package:async_task/src/async_task_isolate.dart:178:7)
#8 AsyncExecutor._executeAlreadyStarted (package:async_task/src/async_task_base.dart:566:28)
#9 AsyncExecutor.execute (package:async_task/src/async_task_base.dart:533:14)
#10 _TaskToExecute.execute (package:async_task/src/async_task_base.dart:695:16)
#11 AsyncExecutor._flushTasksToExecute (package:async_task/src/async_task_base.dart:556:9)
#12 AsyncExecutor.start.<anonymous closure> (package:async_task/src/async_task_base.dart:508:7)
#13 FutureOrExtension.then (package:async_extension/src/async_extension_base.dart:160:21)
#14 AsyncExecutor.start (package:async_task/src/async_task_base.dart:505:29)
#15 AsyncExecutor._executeNotStarted (package:async_task/src/async_task_base.dart:545:5)
#16 AsyncExecutor.execute (package:async_task/src/async_task_base.dart:531:14)
#17 AsyncExecutor.executeAll.<anonymous closure> (package:async_task/src/async_task_base.dart:591:18)
#18 new _GrowableList.generate (dart:core-patch/growable_array.dart:136:28)
The issue is with Authorize.net payment, when I click on place order I get an error:
"no such entity with cartId"
This is happening only if I set the payment option to authorize and capture if I set it to authorize only it's OK.
Also in the main store, it's working fine, the issue is with other stores.
Order is created in admin but stays on pending.
Looks like a cart quote issue getting inactive only in authorize and capture method.
enter image description here
Error on screen:
<response>
<message>No such entity with %fieldName = %fieldValue</message>
<parameters>
<fieldName>cartId</fieldName>
<fieldValue>107</fieldValue>
</parameters>
<trace>
#0 /var/www/magento2/vendor/magento/module-quote/Model/QuoteRepository.php(164): Magento\Framework\Exception\NoSuchEntityException::singleField('cartId', '107')
#1 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteRepository->getActive('107')
#2 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteRepository\Interceptor->___callParent('getActive', Array) #3 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure}('107')
#4 /var/www/magento2/generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php(52): Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins('getActive', Array, Array)
#5 /var/www/magento2/vendor/magento/module-quote/Model/Cart/CartTotalRepository.php(89): Magento\Quote\Model\QuoteRepository\Interceptor->getActive('107')
#6 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\Cart\CartTotalRepository->get('107')
#7 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\Cart\CartTotalRepository\Interceptor->___callParent('get', Array)
#8 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\Cart\CartTotalRepository\Interceptor->Magento\Framework\Interception\{closure}('107')
#9 /var/www/magento2/generated/code/Magento/Quote/Model/Cart/CartTotalRepository/Interceptor.php(26): Magento\Quote\Model\Cart\CartTotalRepository\Interceptor->___callPlugins('get', Array, Array)
#10 /var/www/magento2/vendor/magento/module-checkout/Model/PaymentInformationManagement.php(144): Magento\Quote\Model\Cart\CartTotalRepository\Interceptor->get('107')
#11 /var/www/magento2/vendor/magento/module-checkout/Model/GuestPaymentInformationManagement.php(166): Magento\Checkout\Model\PaymentInformationManagement->getPaymentInformation('107') #12 [internal function]: Magento\Checkout\Model\GuestPaymentInformationManagement->getPaymentInformation('E8MYixrI58pSjig...')
#13 /var/www/magento2/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#14 /var/www/magento2/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#15 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#16 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#17 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#18 /var/www/magento2/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(26): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#19 /var/www/magento2/vendor/magento/framework/App/Http.php(137): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /var/www/magento2/vendor/magento/framework/App/Bootstrap.php(261): Magento\Framework\App\Http->launch()
#21 /var/www/magento2/pub/index.php(40): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#22 {main}
</trace>
</response>
Thank you,
Eran
Console Log show error
[ERROR] LogicException: Unknown module in the requested list: 'Magento_BundleSampleData' in C:\xampp\htdocs\Magento2\setup\src\Magento\Setup\Model\Installer.php:417 Stack trace: #0 C:\xampp\htdocs\Magento2\setup\src\Magento\Setup\Model\Installer.php(378): Magento\Setup\Model\Installer->readListOfModules(Array, Array, 'enable_modules') #1 C:\xampp\htdocs\Magento2\setup\src\Magento\Setup\Model\Installer.php(325): Magento\Setup\Model\Installer->createModulesConfig(Array) #2 C:\xampp\htdocs\Magento2\setup\src\Magento\Setup\Controller\Install.php(103): Magento\Setup\Model\Installer->install(Array) #3 C:\xampp\htdocs\Magento2\vendor\zendframework\zend-mvc\src\Controller\AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction() #4 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent)) #5 C:\xampp\htdocs\Magento2\vendor\zendframework\zend-eventmanager\src\EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #6 C:\xampp\htdocs\Magento2\vendor\zendframework\zend-eventmanager\src\EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #7 C:\xampp\htdocs\Magento2\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #8 C:\xampp\htdocs\Magento2\vendor\zendframework\zend-mvc\src\DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response)) #9 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent)) #10 C:\xampp\htdocs\Magento2\vendor\zendframework\zend-eventmanager\src\EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #11 C:\xampp\htdocs\Magento2\vendor\zendframework\zend-eventmanager\src\EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #12 C:\xampp\htdocs\Magento2\vendor\zendframework\zend-mvc\src\Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #13 C:\xampp\htdocs\Magento2\setup\index.php(31): Zend\Mvc\Application->run() #14 {main}
You can disable this module by going to "Customize Your Store" "Advanced Modules Configurations" and uncheck "Magento_BundleSampleData"
If you would still like to install with this module i would advise you to try clearing all your cache maybe restart apache and mysql and make sure to be in incognito.
pls help me this issue :
The link I'm followed : https://framework.zend.com/manual/2.4/en/user-guide/database-and-models.html for project example
I create new project example with zend 2, but at step "database and model", I have a issue:
An error occurred
An error occurred during execution; please try again later.
Additional information:
Zend\ServiceManager\Exception\ServiceNotFoundException
File:
D:\HungVT\Projects\zend\vendor\zendframework\zend-servicemanager\src\AbstractPluginManager.php:133
Message:
A plugin by the name "getServiceLocator" was not found in the plugin
manager Zend\Mvc\Controller\PluginManager
Stack trace:
#0 D:\HungVT\Projects\zend\vendor\zendframework\zend-mvc\src\Controller\PluginManager.php(98): Zend\ServiceManager\AbstractPluginManager->get('getServiceLocat...', NULL)
#1 D:\HungVT\Projects\zend\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(258): Zend\Mvc\Controller\PluginManager->get('getServiceLocat...', NULL)
#2 D:\HungVT\Projects\zend\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(273): Zend\Mvc\Controller\AbstractController->plugin('getServiceLocat...')
#3 D:\HungVT\Projects\zend\module\Album\src\Album\Controller\AlbumController.php(38): Zend\Mvc\Controller\AbstractController->__call('getServiceLocat...', Array)
#4 D:\HungVT\Projects\zend\module\Album\src\Album\Controller\AlbumController.php(38): Album\Controller\AlbumController->getServiceLocator()
#5 D:\HungVT\Projects\zend\module\Album\src\Album\Controller\AlbumController.php(18): Album\Controller\AlbumController->getAlbumTable()
#6 D:\HungVT\Projects\zend\vendor\zendframework\zend-mvc\src\Controller\AbstractActionController.php(78): Album\Controller\AlbumController->indexAction()
#7 D:\HungVT\Projects\zend\vendor\zendframework\zend-eventmanager\src\EventManager.php(271): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#8 D:\HungVT\Projects\zend\vendor\zendframework\zend-eventmanager\src\EventManager.php(151): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#9 D:\HungVT\Projects\zend\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(105): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#10 D:\HungVT\Projects\zend\vendor\zendframework\zend-mvc\src\DispatchListener.php(119): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#11 D:\HungVT\Projects\zend\vendor\zendframework\zend-eventmanager\src\EventManager.php(271): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#12 D:\HungVT\Projects\zend\vendor\zendframework\zend-eventmanager\src\EventManager.php(151): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#13 D:\HungVT\Projects\zend\vendor\zendframework\zend-mvc\src\Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#14 D:\HungVT\Projects\zend\public\index.php(40): Zend\Mvc\Application->run()
#15 {main}
Thank so much,
Try another tutorial https://docs.zendframework.com/tutorials/getting-started/database-and-models. If i'm not mistaken, getServiceLocator() does not exist anymore.
I'm trying to deploy a site on phpfog, all works well except for my backend. I believe that it might have something to do with my restful controllers (public $restful = true;) because the only views that show the error -> (View [partials.adminHeader] doesn't exist) correspond with using restful controllers. Spent several hours trying to troubleshoot this, can't come up with a solution!
//Full Error
Message:
View [partials.adminHeader] doesn't exist.
Location:
/var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php on line 156
Stack Trace:
#0 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(93): Laravel\View->path('partials.adminH...')
#1 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(204): Laravel\View->__construct('partials.adminH...', Array)
#2 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/helpers.php(526): Laravel\View::make('partials.adminH...', Array)
#3 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(359) : eval()'d code(1): view('partials.adminH...')
#4 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(359): eval()
#5 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/blade.php(71): Laravel\View->get()
#6 [internal function]: Laravel{closure}(Object(Laravel\View))
#7 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/event.php(199): call_user_func_array(Object(Closure), Array)
#8 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/event.php(138): Laravel\Event::fire('laravel.view.en...', Array, true)
#9 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(330): Laravel\Event::until('laravel.view.en...', Array)
#10 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(408): Laravel\View->render()
#11 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(345): Laravel\View->data()
#12 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/blade.php(71): Laravel\View->get()
#13 [internal function]: Laravel{closure}(Object(Laravel\View))
#14 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/event.php(199): call_user_func_array(Object(Closure), Array)
#15 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/event.php(138): Laravel\Event::fire('laravel.view.en...', Array, true)
#16 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(330): Laravel\Event::until('laravel.view.en...', Array)
#17 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(551): Laravel\View->render()
#18 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/response.php(246): Laravel\View->__toString()
#19 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/laravel.php(178): Laravel\Response->render()
#20 /var/fog/apps/app58421/shipwatch.phpfogapp.com/public/index.php(34): require('/var/fog/apps/a...')
#21 {main}
I ran into the same problem, chmod your storage folder as well. chmod -R 755
What happens if you directly render some content in the get() methods
like
class DemoPage_Controller
{
public function getPosts()
{
echo 'Direct outputting';
return;
//return View::make('demopagetemplate');
}
}
If the above still dosent work, make sure you have mod_rewrite enabled on Apache (you can use phpinfo() to chk this)