I am trying to develop magento2.1.5 module but getting exception for my admin controller:
Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', )
Error log record number: 763179888
here is my controller to access from admin:
namespace MyVendor\MyModule\Controller\Adminhtml\Layout;
use MyVendor\MyModule\Controller\Adminhtml\Layout;
class Index extends Layout
{
public function __construct(
\Magento\Backend\App\Action\Context $context
)
{
parent::__construct($context);
}
/**
* @var \Magento\Backend\Model\View\Result\Page
*/
public function execute()
{
if ($this->getRequest()->getQuery('ajax')) {
$this->_forward('grid');
return;
}
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->_resultPageFactory->create();
$resultPage->setActiveMenu('MyVendor_MyModule::main_menu');
$resultPage->getConfig()->getTitle()->prepend(__('My Module'));
return $resultPage;
}
}
namespace MyVendor\MyModule\Controller\Adminhtml;
use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\Registry;
use Magento\Framework\View\Result\PageFactory;
abstract class Layout extends Action
{
/**
* Authorization level
*
* @see _isAllowed()
*/
const ADMIN_RESOURCE = 'MyVendor_MyModule::manage_layout';
/**
* Core registry
*
* @var \Magento\Framework\Registry
*/
protected $_coreRegistry;
/**
* Result page factory
*
* @var \Magento\Framework\View\Result\PageFactory
*/
protected $_resultPageFactory;
/**
* @param Context $context
* @param Registry $coreRegistry
* @param PageFactory $resultPageFactory
*/
public function __construct(
Context $context,
Registry $coreRegistry,
PageFactory $resultPageFactory
) {
parent::__construct($context);
$this->_coreRegistry = $coreRegistry;
$this->_resultPageFactory = $resultPageFactory;
}
}
can anybody help me what should be the reason for this error?
Error log record number: 430498555
– Shahriat Hossain Apr 03 '17 at 14:09Also , I think you've not properly edited the code in the question as the class is defined two times , you should probably edit that . And mark my answer as correct if it helped .
– Vivek Kumar Apr 04 '17 at 05:15