cancel
Showing results for 
Search instead for 
Did you mean: 

M2 error after clicking on Add Product: There has been an error processing your request

M2 error after clicking on Add Product: There has been an error processing your request

SOLVED

 

After a fresh M2 install, when in admin panel I go to Products>Catalog>Add Product I get this error message:

There has been an error processing your request

Exception printing is disabled by default for security reasons.

Error log record number: 786814193458

 

Detailed log from /var/reports/ :

a:4:{i:0;s:120:"Can't create directory /var/www/html/magento2/var/generation/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice/.";i:1;s:9392:"#0 /var/www/html/magento2/lib/internal/Magento/Framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\\Catalog...')
#1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\\Catalog...')
#2 [internal function]: spl_autoload_call('Magento\\Catalog...')
#3 /var/www/html/magento2/lib/internal/Magento/Framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Catalog...')
#4 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Catalog...')
#5 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(71): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Catalog...')
#6 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Catalog...', Array)
#7 /var/www/html/magento2/lib/internal/Magento/Framework/Validator/UniversalFactory.php(36): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Catalog...', Array)
#8 /var/www/html/magento2/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php(547): Magento\Framework\Validator\UniversalFactory->create('Magento\\Catalog...')
#9 /var/www/html/magento2/var/generation/Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor.php(1103): Magento\Eav\Model\Entity\Attribute\AbstractAttribute->getBackend()
#10 /var/www/html/magento2/app/code/Magento/Catalog/Model/Attribute/ScopeOverriddenValue.php(127): Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->getBackend()
#11 /var/www/html/magento2/app/code/Magento/Catalog/Model/Attribute/ScopeOverriddenValue.php(104): Magento\Catalog\Model\Attribute\ScopeOverriddenValue->initAttributeValues('Magento\\Catalog...', Object(Magento\Catalog\Model\Product\Interceptor), 0)
#12 /var/www/html/magento2/app/code/Magento/Catalog/Model/AbstractModel.php(325): Magento\Catalog\Model\Attribute\ScopeOverriddenValue->getDefaultValues('Magento\\Catalog...', Object(Magento\Catalog\Model\Product\Interceptor))
#13 /var/www/html/magento2/var/generation/Magento/Catalog/Model/Product/Interceptor.php(2026): Magento\Catalog\Model\AbstractModel->getAttributeDefaultValue('links_title')
#14 /var/www/html/magento2/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/UsedDefault.php(84): Magento\Catalog\Model\Product\Interceptor->getAttributeDefaultValue('links_title')
#15 /var/www/html/magento2/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/UsedDefault.php(66): Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\UsedDefault->titleUsedDefault('links_title')
#16 /var/www/html/magento2/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Composite.php(81): Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\UsedDefault->modifyMeta(Array)
#17 /var/www/html/magento2/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/ProductDataProvider.php(68): Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Composite->modifyMeta(Array)
#18 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php(270): Magento\Catalog\Ui\DataProvider\Product\Form\ProductDataProvider->getMeta()
#19 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php(165): Magento\Framework\View\Element\UiComponentFactory->mergeMetadata('product_form', Array, false)
#20 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout/Generator/UiComponent.php(128): Magento\Framework\View\Element\UiComponentFactory->create('product_form', NULL, Array)
#21 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout/Generator/UiComponent.php(93): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'product_form', Array, Object(Magento\Framework\View\Layout\Interceptor))
#22 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php(86): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#23 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(344): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#24 /var/www/html/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(89): Magento\Framework\View\Layout->generateElements()
#25 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()
#26 /var/www/html/magento2/lib/internal/Magento/Framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#27 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#28 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(254): Magento\Framework\View\Layout\Builder->build()
#29 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(876): Magento\Framework\View\Layout->build()
#30 /var/www/html/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(414): Magento\Framework\View\Layout->getBlock('menu')
#31 /var/www/html/magento2/app/code/Magento/Backend/Model/View/Result/Page.php(59): Magento\Framework\View\Layout\Interceptor->getBlock('menu')
#32 /var/www/html/magento2/var/generation/Magento/Backend/Model/View/Result/Page/Interceptor.php(24): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Catalog...')
#33 /var/www/html/magento2/app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php(71): Magento\Backend\Model\View\Result\Page\Interceptor->setActiveMenu('Magento_Catalog...')
#34 /var/www/html/magento2/var/generation/Magento/Catalog/Controller/Adminhtml/Product/NewAction/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Product\NewAction->execute()
#35 /var/www/html/magento2/lib/internal/Magento/Framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->execute()
#36 /var/www/html/magento2/app/code/Magento/Backend/App/AbstractAction.php(227): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#37 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#38 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->___callParent('dispatch', Array)
#39 /var/www/html/magento2/app/code/Magento/Backend/App/Action/Plugin/Authentication.php(143): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#40 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#41 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#42 /var/www/html/magento2/var/generation/Magento/Catalog/Controller/Adminhtml/Product/NewAction/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->___callPlugins('dispatch', Array, NULL)
#43 /var/www/html/magento2/lib/internal/Magento/Framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#44 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#45 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#46 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#47 /var/www/html/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#48 /var/www/html/magento2/lib/internal/Magento/Framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#49 /var/www/html/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#50 /var/www/html/magento2/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#51 {main}";s:3:"url";s:114:"/admin/catalog/product/new/set/4/type/simple/key/b45e08ce94c20f7e59d0a74b99410e1f160cdd5bdf79475c3707e713e20ef411/";s:11:"script_name";s:10:"/index.php";}

Any idea whats the problem?

2 REPLIES

Re: M2 error after clicking on Add Product: There has been an error processing your request

Had to go to

cd /var/www/html/magento2

and type 

sudo chown www-data:www-data -R *

 

 

 

 

Re: M2 error after clicking on Add Product: There has been an error processing your request

Hi Emils

 

This was due to a permission error. Normally it will show you that it can't create a directory thing in that specific file path. 

 

I've experienced this before. 

 

Just do this under your site directory

 

Sudo chmod -R * 777 - why 777? for me I'm using that permission because I'm on a development mode. You can also refer in this link: http://magento.stackexchange.com/questions/91870/magento-2-folder-file-permissions

 

 

Thanks,

MazeStricks