Skip to content

Instantly share code, notes, and snippets.

@aepod
Created September 15, 2015 16:12
Show Gist options
  • Save aepod/2c2afa9640265d70f2be to your computer and use it in GitHub Desktop.
Save aepod/2c2afa9640265d70f2be to your computer and use it in GitHub Desktop.
Magento 2 Error --- Area code not set: Area code must be set before starting a session.
Area code not set: Area code must be set before starting a session.
#0 /var/www/magento2/lib/internal/Magento/Framework/Session/SessionManager.php(130): Magento\Framework\Session\SessionManager->start()
#1 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(115): Magento\Framework\Session\SessionManager->__construct(Object(Magento\Framework\App\Request\Http), Object(Magento\Framework\Session\SidResolver\Proxy), Object(Magento\Framework\Session\Config), Object(Magento\Framework\Session\SaveHandler), Object(Magento\Framework\Session\Validator), Object(Magento\Framework\Session\Storage), Object(Magento\Framework\Stdlib\Cookie\PhpCookieManager), Object(Magento\Framework\Stdlib\Cookie\CookieMetadataFactory), Object(Magento\Framework\App\State))
#2 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(91): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#4 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#5 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'session', 'Magento\\Custome...')
#6 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(84): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Custome...', Array, Array)
#7 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Custome...')
#8 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Custome...')
#9 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Custome...', NULL, 'customerSession', 'Magento\\Catalog...')
#10 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(84): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Catalog...', Array, Array)
#11 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Catalog...')
#12 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Catalog...')
#13 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Catalog...', NULL, 'stateKey', 'Magento\\Catalog...')
#14 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(84): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Catalog...', Array, Array)
#15 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Catalog...')
#16 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Catalog...')
#17 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Catalog...', NULL, 'context', 'Magento\\Catalog...')
#18 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(84): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Catalog...', Array, Array)
#19 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Catalog...', Array)
#20 /var/www/magento2/app/code/Magento/Catalog/Model/Layer/Resolver.php(70): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Catalog...')
#21 /var/www/magento2/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Plugin/Aggregation/Category/DataProvider.php(47): Magento\Catalog\Model\Layer\Resolver->get()
#22 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(101): Magento\CatalogSearch\Model\Adapter\Mysql\Plugin\Aggregation\Category\DataProvider->__construct(Object(Magento\Framework\App\Resource), Object(Magento\Store\Model\Resolver\Store), Object(Magento\Catalog\Model\Layer\Resolver))
#23 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(91): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Catalog...', Array)
#24 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Catalog...')
#25 /var/www/magento2/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php(234): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Catalog...')
#26 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(139): Magento\Framework\Interception\PluginList\PluginList->getPlugin('Magento\\Catalog...', 'categoryIdAggre...')
#27 /var/www/magento2/var/generation/Magento/CatalogSearch/Model/Adapter/Mysql/Aggregation/DataProvider/Interceptor.php(27): Magento\CatalogSearch\Model\Adapter\Mysql\Aggregation\DataProvider\Interceptor->___callPlugins('getDataSet', Array, Array)
#28 /var/www/magento2/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php(120): Magento\CatalogSearch\Model\Adapter\Mysql\Aggregation\DataProvider\Interceptor->getDataSet(Object(Magento\Framework\Search\Request\Aggregation\DynamicBucket), Array)
#29 /var/www/magento2/lib/internal/Magento/Framework/Search/Dynamic/Algorithm/Auto.php(62): Magento\CatalogSearch\Model\Adapter\Mysql\Dynamic\DataProvider->getAggregation(Object(Magento\Framework\Search\Request\Aggregation\DynamicBucket), Array, 10, Array, 'count')
#30 /var/www/magento2/lib/internal/Magento/Framework/Search/Dynamic/Algorithm/Auto.php(42): Magento\Framework\Search\Dynamic\Algorithm\Auto->getRange(Object(Magento\Framework\Search\Request\Aggregation\DynamicBucket), Array, Array)
#31 /var/www/magento2/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Builder/Dynamic.php(39): Magento\Framework\Search\Dynamic\Algorithm\Auto->getItems(Object(Magento\Framework\Search\Request\Aggregation\DynamicBucket), Array, Array)
#32 /var/www/magento2/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Builder.php(97): Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder\Dynamic->build(Object(Magento\CatalogSearch\Model\Adapter\Mysql\Aggregation\DataProvider\Interceptor), Array, Object(Magento\Framework\Search\Request\Aggregation\DynamicBucket), Array)
#33 /var/www/magento2/lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Builder.php(62): Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder->processAggregations(Object(Magento\Framework\Search\Request), Array)
#34 /var/www/magento2/lib/internal/Magento/Framework/Search/Adapter/Mysql/Adapter.php(70): Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder->build(Object(Magento\Framework\Search\Request), Array)
#35 /var/www/magento2/app/code/Magento/Search/Model/SearchEngine.php(42): Magento\Framework\Search\Adapter\Mysql\Adapter->query(Object(Magento\Framework\Search\Request))
#36 /var/www/magento2/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php(191): Magento\Search\Model\SearchEngine->search(Object(Magento\Framework\Search\Request))
#37 /var/www/magento2/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php(337): Magento\CatalogSearch\Model\Resource\Fulltext\Collection->_renderFiltersBefore()
#38 /var/www/magento2/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php(219): Magento\Framework\Data\Collection\AbstractDb->_renderFilters()
#39 /var/www/magento2/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php(893): Magento\CatalogSearch\Model\Resource\Fulltext\Collection->_renderFilters()
#40 /var/www/magento2/app/code/Magento/Catalog/Model/Resource/Product/Collection.php(728): Magento\Eav\Model\Entity\Collection\AbstractCollection->load(false, false)
#41 /var/www/magento2/app/code/Magento/Review/Model/Observer.php(90): Magento\Catalog\Model\Resource\Product\Collection->load()
#42 /var/www/magento2/lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php(76): Magento\Review\Model\Observer->catalogBlockProductCollectionBeforeToHtml(Object(Magento\Framework\Event\Observer))
#43 /var/www/magento2/lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Review\Model\Observer), 'catalogBlockPro...', Object(Magento\Framework\Event\Observer))
#44 /var/www/magento2/lib/internal/Magento/Framework/Event/Manager.php(65): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#45 /var/www/magento2/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('catalog_block_p...', Array)
#46 /var/www/magento2/app/code/Magento/Catalog/Block/Product/ListProduct.php(203): Magento\Framework\Event\Manager\Proxy->dispatch('catalog_block_p...', Array)
#47 /var/www/magento2/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(651): Magento\Catalog\Block\Product\ListProduct->_beforeToHtml()
#48 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(521): Magento\Framework\View\Element\AbstractBlock->toHtml()
#49 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(497): Magento\Framework\View\Layout->_renderBlock('category.produc...')
#50 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('category.produc...')
#51 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(473): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('category.produc...')
#52 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('category.produc...', true)
#53 /var/www/magento2/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(492): Magento\Framework\View\Layout\Interceptor->renderElement('category.produc...', true)
#54 /var/www/magento2/app/code/Magento/Catalog/Block/Category/View.php(98): Magento\Framework\View\Element\AbstractBlock->getChildHtml('product_list')
#55 /var/www/magento2/app/code/Magento/Catalog/view/frontend/templates/category/products.phtml(18): Magento\Catalog\Block\Category\View->getProductListHtml()
#56 /var/www/magento2/lib/internal/Magento/Framework/View/TemplateEngine/Php.php(59): include('/var/www/magent...')
#57 /var/www/magento2/lib/internal/Magento/Framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Category\View), '/var/www/magent...', Array)
#58 /var/www/magento2/lib/internal/Magento/Framework/View/Element/Template.php(275): Magento\Framework\View\Element\Template->fetchView('/var/www/magent...')
#59 /var/www/magento2/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(652): Magento\Framework\View\Element\Template->_toHtml()
#60 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(521): Magento\Framework\View\Element\AbstractBlock->toHtml()
#61 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(497): Magento\Framework\View\Layout->_renderBlock('category.produc...')
#62 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('category.produc...')
#63 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(473): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('category.produc...')
#64 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('category.produc...', true)
#65 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(548): Magento\Framework\View\Layout\Interceptor->renderElement('category.produc...')
#66 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(499): Magento\Framework\View\Layout->_renderContainer('content')
#67 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('content')
#68 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(473): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content')
#69 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('content', true)
#70 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(548): Magento\Framework\View\Layout\Interceptor->renderElement('content')
#71 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(499): Magento\Framework\View\Layout->_renderContainer('main')
#72 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main')
#73 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(473): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main')
#74 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main', true)
#75 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(548): Magento\Framework\View\Layout\Interceptor->renderElement('main')
#76 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(499): Magento\Framework\View\Layout->_renderContainer('columns')
#77 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('columns')
#78 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(473): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns')
#79 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('columns', true)
#80 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(548): Magento\Framework\View\Layout\Interceptor->renderElement('columns')
#81 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(499): Magento\Framework\View\Layout->_renderContainer('main.content')
#82 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main.content')
#83 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(473): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content')
#84 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main.content', true)
#85 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(548): Magento\Framework\View\Layout\Interceptor->renderElement('main.content')
#86 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(499): Magento\Framework\View\Layout->_renderContainer('page.wrapper')
#87 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#88 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(473): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#89 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', true)
#90 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(548): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper')
#91 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(499): Magento\Framework\View\Layout->_renderContainer('root')
#92 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#93 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(473): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#94 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#95 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(917): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#96 [internal function]: Magento\Framework\View\Layout->getOutput()
#97 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(144): call_user_func_array(Array, Array)
#98 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#99 /var/www/magento2/lib/internal/Magento/Framework/View/Result/Page.php(241): Magento\Framework\View\Layout\Interceptor->getOutput()
#100 /var/www/magento2/lib/internal/Magento/Framework/View/Result/Layout.php(162): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#101 [internal function]: Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#102 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)
#103 /var/www/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(70): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#104 /var/www/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult', Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-varnish-...')
#105 /var/www/magento2/app/code/Magento/PageCache/Model/Controller/Result/VarnishPlugin.php(74): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#106 [internal function]: Magento\PageCache\Model\Controller\Result\VarnishPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor))
#107 /var/www/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#108 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult', Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-builtin-...')
#109 /var/www/magento2/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php(67): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#110 [internal function]: Magento\PageCache\Model\Controller\Result\BuiltinPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor))
#111 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
#112 /var/www/magento2/var/generation/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#113 /var/www/magento2/lib/internal/Magento/Framework/App/Http.php(119): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#114 /var/www/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(257): Magento\Framework\App\Http->launch()
#115 /var/www/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#116 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment