Error in custom Admin menu controller - Magento 2 Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Magento 2 Custom module admin controller errorHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlI created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error?main.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2: How to override newsletter Subscriber modelForm is not displayed on panel admin Magento 2Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 Can't view module's front end page output?

For a new assistant professor in CS, how to build/manage a publication pipeline

What is the meaning of the new sigil in Game of Thrones Season 8 intro?

Do I really need to have a message in a novel to appeal to readers?

Using et al. for a last / senior author rather than for a first author

What are the out-of-universe reasons for the references to Toby Maguire-era Spider-Man in ITSV

What font is "z" in "z-score"?

Is it a good idea to use CNN to classify 1D signal?

What causes the direction of lightning flashes?

What do you call the main part of a joke?

How do I find out the mythology and history of my Fortress?

Can a new player join a group only when a new campaign starts?

How to compare two different files line by line in unix?

Is it common practice to audition new musicians one-on-one before rehearsing with the entire band?

What does "lightly crushed" mean for cardamon pods?

First console to have temporary backward compatibility

Why didn't Eitri join the fight?

How do pianists reach extremely loud dynamics?

What is the longest distance a player character can jump in one leap?

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

Significance of Cersei's obsession with elephants?

Is this homebrew Lady of Pain warlock patron balanced?

Using audio cues to encourage good posture

How would a mousetrap for use in space work?

If a VARCHAR(MAX) column is included in an index, is the entire value always stored in the index page(s)?



Error in custom Admin menu controller - Magento 2



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Magento 2 Custom module admin controller errorHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlI created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error?main.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2: How to override newsletter Subscriber modelForm is not displayed on panel admin Magento 2Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 Can't view module's front end page output?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I created a custom menu but got this error.




Fatal error: Class NewsLatestNewsControllerAdminhtmlNews contains
1 abstract method and must therefore be declared abstract or implement
the remaining methods (MagentoFrameworkAppActionInterface::execute)
in
C:xampphtdocsmagento3appcodeNewsLatestNewsControllerAdminhtmlNews.php
on line 12




these are the codes



NewsLatestNewsControllerAdminhtmlNews.php



<?php 
namespace NewsLatestNewsControllerAdminhtml;

use MagentoBackendAppAction;
use MagentoBackendAppActionContext;
use MagentoFrameworkRegistry;
use MagentoFrameworkViewResultPageFactory;
use NewsLatestNewsModelNewsFactory;

abstract class News extends Action

/**
* Core registry
*
* @var MagentoFrameworkRegistry
*/
protected $_coreRegistry;

/**
* Result page factory
*
* @var MagentoFrameworkViewResultPageFactory
*/
protected $_resultPageFactory;

/**
* News model factory
*
* @var NewsLatestNewsModelNewsFactory
*/
protected $_newsFactory;

/**
* @param Context $context
* @param Registry $coreRegistry
* @param PageFactory $resultPageFactory
* @param NewsFactory $newsFactory
*/
public function __construct(Context $context,
Registry $coreRegistry,
PageFactory $resultPageFactory,
NewsFactory $newsFactory
)
parent::__construct($context);
$this->_coreRegistry = $coreRegistry;
$this->_resultPageFactory = $resultPageFactory;
$this->_newsFactory = $newsFactory;


/**
* News access rights checking
*
* @return bool
*/
protected function _isAllowed()

return $this->_authorization->isAllowed('News_LatestNews::manage_news');




NewsLatestNewsControllerAdminhtmlNewsIndex.php



<?php

namespace NewsLatestNewsControllerAdminhtmlNews;

use NewsLatestNewsControllerAdminhtmlNews;

class Index extends News

/**
* @return void
*/
public function execute()

if ($this->getRequest()->getQuery('ajax'))
$this->_forward('grid');
return;


/** @var MagentoBackendModelViewResultPage $resultPage */
$resultPage = $this->_resultPageFactory->create();
$resultPage->setActiveMenu('News_LatestNews::main_menu');
$resultPage->getConfig()->getTitle()->prepend(__('Simple News'));

return $resultPage;




NewsLatestNewsBlockAdminhtmlNewsNews.php



<?php

namespace NewsLatestNewsBlockAdminhtml;

use MagentoBackendBlockWidgetGridContainer;

class News extends Container

/**
* Constructor
*
* @return void
*/
protected function _construct()

$this->_controller = 'adminhtml_news';
$this->_blockGroup = 'News_LatestNews';
$this->_headerText = __('Manage News');
$this->_addButtonLabel = __('Add News');
parent::_construct();




NewsLatestNewsetcadminhtmlmenu.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Backend/etc/menu.xsd">
<menu>
<add id="News_LatestNews::main_menu" title="Simple News"
module="News_LatestNews" sortOrder="20"
resource="News_LatestNews::simplenews" />
<add id="News_LatestNews::add_news" title="Add News"
module="News_LatestNews" sortOrder="1" parent="News_LatestNews::main_menu"
action="simplenews/news/new" resource="News_LatestNews::manage_news" />
<add id="News_LatestNews::manage_news" title="Manage News"
module="News_LatestNews" sortOrder="2" parent="News_LatestNews::main_menu"
action="simplenews/news/index" resource="News_LatestNews::manage_news" />
<add id="News_LatestNews::configuration" title="Configurations"
module="News_LatestNews" sortOrder="3" parent="News_LatestNews::main_menu"
action="adminhtml/system_config/edit/section/simplenews"
resource="News_LatestNews::configuration" />
</menu>
</config>


NewsLatestNewsetcadminhtmlroutes.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
<router id="admin">
<route id="simplenews" frontName="simplenews">
<!-- <module name="Tutorial_SimpleNews" /> -->
<module name="News_LatestNews" />
</route>
</router>
</config>


NewsLatestNewsetcacl.xml



<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
<resource id="News_LatestNews::simplenews" title="Simple News"
sortOrder="100">
<resource id="News_LatestNews::add_news" title="Add News"
sortOrder="1" />
<resource id="News_LatestNews::manage_news" title="Manage News"
sortOrder="2" />
<resource id="News_LatestNews::configuration" title="Configurations"
sortOrder="3" />
</resource>

<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="News_LatestNews::config" title="News Configuration" sortOrder="50" />
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>


NewsLatestNewsetcmodule.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="News_LatestNews" setup_version="1.0.2" active="true">
</module>
</config>


Edit:



1 exception(s):
Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array (
0 => true,
1 => 1,
2 => 'true',
3 => '1',
4 => false,
5 => 0,
6 => 'false',
7 => '0',
)









share|improve this question
























  • php bin/magento setup:di:compile run & check

    – Ankit Shah
    Feb 17 '17 at 6:01











  • delete vargeneration folder and check.

    – Anand Ontigeri
    Feb 17 '17 at 6:05

















0















I created a custom menu but got this error.




Fatal error: Class NewsLatestNewsControllerAdminhtmlNews contains
1 abstract method and must therefore be declared abstract or implement
the remaining methods (MagentoFrameworkAppActionInterface::execute)
in
C:xampphtdocsmagento3appcodeNewsLatestNewsControllerAdminhtmlNews.php
on line 12




these are the codes



NewsLatestNewsControllerAdminhtmlNews.php



<?php 
namespace NewsLatestNewsControllerAdminhtml;

use MagentoBackendAppAction;
use MagentoBackendAppActionContext;
use MagentoFrameworkRegistry;
use MagentoFrameworkViewResultPageFactory;
use NewsLatestNewsModelNewsFactory;

abstract class News extends Action

/**
* Core registry
*
* @var MagentoFrameworkRegistry
*/
protected $_coreRegistry;

/**
* Result page factory
*
* @var MagentoFrameworkViewResultPageFactory
*/
protected $_resultPageFactory;

/**
* News model factory
*
* @var NewsLatestNewsModelNewsFactory
*/
protected $_newsFactory;

/**
* @param Context $context
* @param Registry $coreRegistry
* @param PageFactory $resultPageFactory
* @param NewsFactory $newsFactory
*/
public function __construct(Context $context,
Registry $coreRegistry,
PageFactory $resultPageFactory,
NewsFactory $newsFactory
)
parent::__construct($context);
$this->_coreRegistry = $coreRegistry;
$this->_resultPageFactory = $resultPageFactory;
$this->_newsFactory = $newsFactory;


/**
* News access rights checking
*
* @return bool
*/
protected function _isAllowed()

return $this->_authorization->isAllowed('News_LatestNews::manage_news');




NewsLatestNewsControllerAdminhtmlNewsIndex.php



<?php

namespace NewsLatestNewsControllerAdminhtmlNews;

use NewsLatestNewsControllerAdminhtmlNews;

class Index extends News

/**
* @return void
*/
public function execute()

if ($this->getRequest()->getQuery('ajax'))
$this->_forward('grid');
return;


/** @var MagentoBackendModelViewResultPage $resultPage */
$resultPage = $this->_resultPageFactory->create();
$resultPage->setActiveMenu('News_LatestNews::main_menu');
$resultPage->getConfig()->getTitle()->prepend(__('Simple News'));

return $resultPage;




NewsLatestNewsBlockAdminhtmlNewsNews.php



<?php

namespace NewsLatestNewsBlockAdminhtml;

use MagentoBackendBlockWidgetGridContainer;

class News extends Container

/**
* Constructor
*
* @return void
*/
protected function _construct()

$this->_controller = 'adminhtml_news';
$this->_blockGroup = 'News_LatestNews';
$this->_headerText = __('Manage News');
$this->_addButtonLabel = __('Add News');
parent::_construct();




NewsLatestNewsetcadminhtmlmenu.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Backend/etc/menu.xsd">
<menu>
<add id="News_LatestNews::main_menu" title="Simple News"
module="News_LatestNews" sortOrder="20"
resource="News_LatestNews::simplenews" />
<add id="News_LatestNews::add_news" title="Add News"
module="News_LatestNews" sortOrder="1" parent="News_LatestNews::main_menu"
action="simplenews/news/new" resource="News_LatestNews::manage_news" />
<add id="News_LatestNews::manage_news" title="Manage News"
module="News_LatestNews" sortOrder="2" parent="News_LatestNews::main_menu"
action="simplenews/news/index" resource="News_LatestNews::manage_news" />
<add id="News_LatestNews::configuration" title="Configurations"
module="News_LatestNews" sortOrder="3" parent="News_LatestNews::main_menu"
action="adminhtml/system_config/edit/section/simplenews"
resource="News_LatestNews::configuration" />
</menu>
</config>


NewsLatestNewsetcadminhtmlroutes.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
<router id="admin">
<route id="simplenews" frontName="simplenews">
<!-- <module name="Tutorial_SimpleNews" /> -->
<module name="News_LatestNews" />
</route>
</router>
</config>


NewsLatestNewsetcacl.xml



<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
<resource id="News_LatestNews::simplenews" title="Simple News"
sortOrder="100">
<resource id="News_LatestNews::add_news" title="Add News"
sortOrder="1" />
<resource id="News_LatestNews::manage_news" title="Manage News"
sortOrder="2" />
<resource id="News_LatestNews::configuration" title="Configurations"
sortOrder="3" />
</resource>

<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="News_LatestNews::config" title="News Configuration" sortOrder="50" />
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>


NewsLatestNewsetcmodule.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="News_LatestNews" setup_version="1.0.2" active="true">
</module>
</config>


Edit:



1 exception(s):
Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array (
0 => true,
1 => 1,
2 => 'true',
3 => '1',
4 => false,
5 => 0,
6 => 'false',
7 => '0',
)









share|improve this question
























  • php bin/magento setup:di:compile run & check

    – Ankit Shah
    Feb 17 '17 at 6:01











  • delete vargeneration folder and check.

    – Anand Ontigeri
    Feb 17 '17 at 6:05













0












0








0








I created a custom menu but got this error.




Fatal error: Class NewsLatestNewsControllerAdminhtmlNews contains
1 abstract method and must therefore be declared abstract or implement
the remaining methods (MagentoFrameworkAppActionInterface::execute)
in
C:xampphtdocsmagento3appcodeNewsLatestNewsControllerAdminhtmlNews.php
on line 12




these are the codes



NewsLatestNewsControllerAdminhtmlNews.php



<?php 
namespace NewsLatestNewsControllerAdminhtml;

use MagentoBackendAppAction;
use MagentoBackendAppActionContext;
use MagentoFrameworkRegistry;
use MagentoFrameworkViewResultPageFactory;
use NewsLatestNewsModelNewsFactory;

abstract class News extends Action

/**
* Core registry
*
* @var MagentoFrameworkRegistry
*/
protected $_coreRegistry;

/**
* Result page factory
*
* @var MagentoFrameworkViewResultPageFactory
*/
protected $_resultPageFactory;

/**
* News model factory
*
* @var NewsLatestNewsModelNewsFactory
*/
protected $_newsFactory;

/**
* @param Context $context
* @param Registry $coreRegistry
* @param PageFactory $resultPageFactory
* @param NewsFactory $newsFactory
*/
public function __construct(Context $context,
Registry $coreRegistry,
PageFactory $resultPageFactory,
NewsFactory $newsFactory
)
parent::__construct($context);
$this->_coreRegistry = $coreRegistry;
$this->_resultPageFactory = $resultPageFactory;
$this->_newsFactory = $newsFactory;


/**
* News access rights checking
*
* @return bool
*/
protected function _isAllowed()

return $this->_authorization->isAllowed('News_LatestNews::manage_news');




NewsLatestNewsControllerAdminhtmlNewsIndex.php



<?php

namespace NewsLatestNewsControllerAdminhtmlNews;

use NewsLatestNewsControllerAdminhtmlNews;

class Index extends News

/**
* @return void
*/
public function execute()

if ($this->getRequest()->getQuery('ajax'))
$this->_forward('grid');
return;


/** @var MagentoBackendModelViewResultPage $resultPage */
$resultPage = $this->_resultPageFactory->create();
$resultPage->setActiveMenu('News_LatestNews::main_menu');
$resultPage->getConfig()->getTitle()->prepend(__('Simple News'));

return $resultPage;




NewsLatestNewsBlockAdminhtmlNewsNews.php



<?php

namespace NewsLatestNewsBlockAdminhtml;

use MagentoBackendBlockWidgetGridContainer;

class News extends Container

/**
* Constructor
*
* @return void
*/
protected function _construct()

$this->_controller = 'adminhtml_news';
$this->_blockGroup = 'News_LatestNews';
$this->_headerText = __('Manage News');
$this->_addButtonLabel = __('Add News');
parent::_construct();




NewsLatestNewsetcadminhtmlmenu.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Backend/etc/menu.xsd">
<menu>
<add id="News_LatestNews::main_menu" title="Simple News"
module="News_LatestNews" sortOrder="20"
resource="News_LatestNews::simplenews" />
<add id="News_LatestNews::add_news" title="Add News"
module="News_LatestNews" sortOrder="1" parent="News_LatestNews::main_menu"
action="simplenews/news/new" resource="News_LatestNews::manage_news" />
<add id="News_LatestNews::manage_news" title="Manage News"
module="News_LatestNews" sortOrder="2" parent="News_LatestNews::main_menu"
action="simplenews/news/index" resource="News_LatestNews::manage_news" />
<add id="News_LatestNews::configuration" title="Configurations"
module="News_LatestNews" sortOrder="3" parent="News_LatestNews::main_menu"
action="adminhtml/system_config/edit/section/simplenews"
resource="News_LatestNews::configuration" />
</menu>
</config>


NewsLatestNewsetcadminhtmlroutes.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
<router id="admin">
<route id="simplenews" frontName="simplenews">
<!-- <module name="Tutorial_SimpleNews" /> -->
<module name="News_LatestNews" />
</route>
</router>
</config>


NewsLatestNewsetcacl.xml



<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
<resource id="News_LatestNews::simplenews" title="Simple News"
sortOrder="100">
<resource id="News_LatestNews::add_news" title="Add News"
sortOrder="1" />
<resource id="News_LatestNews::manage_news" title="Manage News"
sortOrder="2" />
<resource id="News_LatestNews::configuration" title="Configurations"
sortOrder="3" />
</resource>

<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="News_LatestNews::config" title="News Configuration" sortOrder="50" />
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>


NewsLatestNewsetcmodule.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="News_LatestNews" setup_version="1.0.2" active="true">
</module>
</config>


Edit:



1 exception(s):
Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array (
0 => true,
1 => 1,
2 => 'true',
3 => '1',
4 => false,
5 => 0,
6 => 'false',
7 => '0',
)









share|improve this question
















I created a custom menu but got this error.




Fatal error: Class NewsLatestNewsControllerAdminhtmlNews contains
1 abstract method and must therefore be declared abstract or implement
the remaining methods (MagentoFrameworkAppActionInterface::execute)
in
C:xampphtdocsmagento3appcodeNewsLatestNewsControllerAdminhtmlNews.php
on line 12




these are the codes



NewsLatestNewsControllerAdminhtmlNews.php



<?php 
namespace NewsLatestNewsControllerAdminhtml;

use MagentoBackendAppAction;
use MagentoBackendAppActionContext;
use MagentoFrameworkRegistry;
use MagentoFrameworkViewResultPageFactory;
use NewsLatestNewsModelNewsFactory;

abstract class News extends Action

/**
* Core registry
*
* @var MagentoFrameworkRegistry
*/
protected $_coreRegistry;

/**
* Result page factory
*
* @var MagentoFrameworkViewResultPageFactory
*/
protected $_resultPageFactory;

/**
* News model factory
*
* @var NewsLatestNewsModelNewsFactory
*/
protected $_newsFactory;

/**
* @param Context $context
* @param Registry $coreRegistry
* @param PageFactory $resultPageFactory
* @param NewsFactory $newsFactory
*/
public function __construct(Context $context,
Registry $coreRegistry,
PageFactory $resultPageFactory,
NewsFactory $newsFactory
)
parent::__construct($context);
$this->_coreRegistry = $coreRegistry;
$this->_resultPageFactory = $resultPageFactory;
$this->_newsFactory = $newsFactory;


/**
* News access rights checking
*
* @return bool
*/
protected function _isAllowed()

return $this->_authorization->isAllowed('News_LatestNews::manage_news');




NewsLatestNewsControllerAdminhtmlNewsIndex.php



<?php

namespace NewsLatestNewsControllerAdminhtmlNews;

use NewsLatestNewsControllerAdminhtmlNews;

class Index extends News

/**
* @return void
*/
public function execute()

if ($this->getRequest()->getQuery('ajax'))
$this->_forward('grid');
return;


/** @var MagentoBackendModelViewResultPage $resultPage */
$resultPage = $this->_resultPageFactory->create();
$resultPage->setActiveMenu('News_LatestNews::main_menu');
$resultPage->getConfig()->getTitle()->prepend(__('Simple News'));

return $resultPage;




NewsLatestNewsBlockAdminhtmlNewsNews.php



<?php

namespace NewsLatestNewsBlockAdminhtml;

use MagentoBackendBlockWidgetGridContainer;

class News extends Container

/**
* Constructor
*
* @return void
*/
protected function _construct()

$this->_controller = 'adminhtml_news';
$this->_blockGroup = 'News_LatestNews';
$this->_headerText = __('Manage News');
$this->_addButtonLabel = __('Add News');
parent::_construct();




NewsLatestNewsetcadminhtmlmenu.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Backend/etc/menu.xsd">
<menu>
<add id="News_LatestNews::main_menu" title="Simple News"
module="News_LatestNews" sortOrder="20"
resource="News_LatestNews::simplenews" />
<add id="News_LatestNews::add_news" title="Add News"
module="News_LatestNews" sortOrder="1" parent="News_LatestNews::main_menu"
action="simplenews/news/new" resource="News_LatestNews::manage_news" />
<add id="News_LatestNews::manage_news" title="Manage News"
module="News_LatestNews" sortOrder="2" parent="News_LatestNews::main_menu"
action="simplenews/news/index" resource="News_LatestNews::manage_news" />
<add id="News_LatestNews::configuration" title="Configurations"
module="News_LatestNews" sortOrder="3" parent="News_LatestNews::main_menu"
action="adminhtml/system_config/edit/section/simplenews"
resource="News_LatestNews::configuration" />
</menu>
</config>


NewsLatestNewsetcadminhtmlroutes.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
<router id="admin">
<route id="simplenews" frontName="simplenews">
<!-- <module name="Tutorial_SimpleNews" /> -->
<module name="News_LatestNews" />
</route>
</router>
</config>


NewsLatestNewsetcacl.xml



<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
<resource id="News_LatestNews::simplenews" title="Simple News"
sortOrder="100">
<resource id="News_LatestNews::add_news" title="Add News"
sortOrder="1" />
<resource id="News_LatestNews::manage_news" title="Manage News"
sortOrder="2" />
<resource id="News_LatestNews::configuration" title="Configurations"
sortOrder="3" />
</resource>

<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="News_LatestNews::config" title="News Configuration" sortOrder="50" />
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>


NewsLatestNewsetcmodule.xml



<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="News_LatestNews" setup_version="1.0.2" active="true">
</module>
</config>


Edit:



1 exception(s):
Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array (
0 => true,
1 => 1,
2 => 'true',
3 => '1',
4 => false,
5 => 0,
6 => 'false',
7 => '0',
)






magento2 adminhtml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 15 mins ago









Muhammad Anas

6501320




6501320










asked Feb 17 '17 at 6:00









enjamesenjames

154




154












  • php bin/magento setup:di:compile run & check

    – Ankit Shah
    Feb 17 '17 at 6:01











  • delete vargeneration folder and check.

    – Anand Ontigeri
    Feb 17 '17 at 6:05

















  • php bin/magento setup:di:compile run & check

    – Ankit Shah
    Feb 17 '17 at 6:01











  • delete vargeneration folder and check.

    – Anand Ontigeri
    Feb 17 '17 at 6:05
















php bin/magento setup:di:compile run & check

– Ankit Shah
Feb 17 '17 at 6:01





php bin/magento setup:di:compile run & check

– Ankit Shah
Feb 17 '17 at 6:01













delete vargeneration folder and check.

– Anand Ontigeri
Feb 17 '17 at 6:05





delete vargeneration folder and check.

– Anand Ontigeri
Feb 17 '17 at 6:05










1 Answer
1






active

oldest

votes


















3














The error is self-explained. NewsLatestNewsControllerAdminhtmlNews extends from abstract class MagentoBackendAppAction which implements MagentoFrameworkAppActionInterface::execute(). So, in your custom controller class need to have execute() method.



Or, NewsLatestNewsControllerAdminhtmlNews is an abstract class.






share|improve this answer

























  • in NewsLatestNewsControllerAdminhtmlNewsIndex.php there is an execute method which is extended in NewsLatestNewsControllerAdminhtmlNews , is it wrong?

    – enjames
    Feb 17 '17 at 7:00












  • @enjames NewsLatestNewsControllerAdminhtmlNews should be an abstract class. So, you don't need to declare the execute method in this class. Your index controller will extend from it and declare execute method .

    – Khoa TruongDinh
    Feb 17 '17 at 7:15











  • O got a new error 1 exception(s): Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) i just add abstract abstract class News extends Action,

    – enjames
    Feb 17 '17 at 8:27











  • @enjames you can update your question with the new code lines?

    – Khoa TruongDinh
    Feb 17 '17 at 8:39











  • You tried to var_dump() what? You tried to use var_dump and then show the new error?

    – Khoa TruongDinh
    Feb 17 '17 at 9:03











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f160407%2ferror-in-custom-admin-menu-controller-magento-2%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














The error is self-explained. NewsLatestNewsControllerAdminhtmlNews extends from abstract class MagentoBackendAppAction which implements MagentoFrameworkAppActionInterface::execute(). So, in your custom controller class need to have execute() method.



Or, NewsLatestNewsControllerAdminhtmlNews is an abstract class.






share|improve this answer

























  • in NewsLatestNewsControllerAdminhtmlNewsIndex.php there is an execute method which is extended in NewsLatestNewsControllerAdminhtmlNews , is it wrong?

    – enjames
    Feb 17 '17 at 7:00












  • @enjames NewsLatestNewsControllerAdminhtmlNews should be an abstract class. So, you don't need to declare the execute method in this class. Your index controller will extend from it and declare execute method .

    – Khoa TruongDinh
    Feb 17 '17 at 7:15











  • O got a new error 1 exception(s): Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) i just add abstract abstract class News extends Action,

    – enjames
    Feb 17 '17 at 8:27











  • @enjames you can update your question with the new code lines?

    – Khoa TruongDinh
    Feb 17 '17 at 8:39











  • You tried to var_dump() what? You tried to use var_dump and then show the new error?

    – Khoa TruongDinh
    Feb 17 '17 at 9:03















3














The error is self-explained. NewsLatestNewsControllerAdminhtmlNews extends from abstract class MagentoBackendAppAction which implements MagentoFrameworkAppActionInterface::execute(). So, in your custom controller class need to have execute() method.



Or, NewsLatestNewsControllerAdminhtmlNews is an abstract class.






share|improve this answer

























  • in NewsLatestNewsControllerAdminhtmlNewsIndex.php there is an execute method which is extended in NewsLatestNewsControllerAdminhtmlNews , is it wrong?

    – enjames
    Feb 17 '17 at 7:00












  • @enjames NewsLatestNewsControllerAdminhtmlNews should be an abstract class. So, you don't need to declare the execute method in this class. Your index controller will extend from it and declare execute method .

    – Khoa TruongDinh
    Feb 17 '17 at 7:15











  • O got a new error 1 exception(s): Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) i just add abstract abstract class News extends Action,

    – enjames
    Feb 17 '17 at 8:27











  • @enjames you can update your question with the new code lines?

    – Khoa TruongDinh
    Feb 17 '17 at 8:39











  • You tried to var_dump() what? You tried to use var_dump and then show the new error?

    – Khoa TruongDinh
    Feb 17 '17 at 9:03













3












3








3







The error is self-explained. NewsLatestNewsControllerAdminhtmlNews extends from abstract class MagentoBackendAppAction which implements MagentoFrameworkAppActionInterface::execute(). So, in your custom controller class need to have execute() method.



Or, NewsLatestNewsControllerAdminhtmlNews is an abstract class.






share|improve this answer















The error is self-explained. NewsLatestNewsControllerAdminhtmlNews extends from abstract class MagentoBackendAppAction which implements MagentoFrameworkAppActionInterface::execute(). So, in your custom controller class need to have execute() method.



Or, NewsLatestNewsControllerAdminhtmlNews is an abstract class.







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 17 '17 at 6:20

























answered Feb 17 '17 at 6:11









Khoa TruongDinhKhoa TruongDinh

22.2k64187




22.2k64187












  • in NewsLatestNewsControllerAdminhtmlNewsIndex.php there is an execute method which is extended in NewsLatestNewsControllerAdminhtmlNews , is it wrong?

    – enjames
    Feb 17 '17 at 7:00












  • @enjames NewsLatestNewsControllerAdminhtmlNews should be an abstract class. So, you don't need to declare the execute method in this class. Your index controller will extend from it and declare execute method .

    – Khoa TruongDinh
    Feb 17 '17 at 7:15











  • O got a new error 1 exception(s): Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) i just add abstract abstract class News extends Action,

    – enjames
    Feb 17 '17 at 8:27











  • @enjames you can update your question with the new code lines?

    – Khoa TruongDinh
    Feb 17 '17 at 8:39











  • You tried to var_dump() what? You tried to use var_dump and then show the new error?

    – Khoa TruongDinh
    Feb 17 '17 at 9:03

















  • in NewsLatestNewsControllerAdminhtmlNewsIndex.php there is an execute method which is extended in NewsLatestNewsControllerAdminhtmlNews , is it wrong?

    – enjames
    Feb 17 '17 at 7:00












  • @enjames NewsLatestNewsControllerAdminhtmlNews should be an abstract class. So, you don't need to declare the execute method in this class. Your index controller will extend from it and declare execute method .

    – Khoa TruongDinh
    Feb 17 '17 at 7:15











  • O got a new error 1 exception(s): Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) i just add abstract abstract class News extends Action,

    – enjames
    Feb 17 '17 at 8:27











  • @enjames you can update your question with the new code lines?

    – Khoa TruongDinh
    Feb 17 '17 at 8:39











  • You tried to var_dump() what? You tried to use var_dump and then show the new error?

    – Khoa TruongDinh
    Feb 17 '17 at 9:03
















in NewsLatestNewsControllerAdminhtmlNewsIndex.php there is an execute method which is extended in NewsLatestNewsControllerAdminhtmlNews , is it wrong?

– enjames
Feb 17 '17 at 7:00






in NewsLatestNewsControllerAdminhtmlNewsIndex.php there is an execute method which is extended in NewsLatestNewsControllerAdminhtmlNews , is it wrong?

– enjames
Feb 17 '17 at 7:00














@enjames NewsLatestNewsControllerAdminhtmlNews should be an abstract class. So, you don't need to declare the execute method in this class. Your index controller will extend from it and declare execute method .

– Khoa TruongDinh
Feb 17 '17 at 7:15





@enjames NewsLatestNewsControllerAdminhtmlNews should be an abstract class. So, you don't need to declare the execute method in this class. Your index controller will extend from it and declare execute method .

– Khoa TruongDinh
Feb 17 '17 at 7:15













O got a new error 1 exception(s): Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) i just add abstract abstract class News extends Action,

– enjames
Feb 17 '17 at 8:27





O got a new error 1 exception(s): Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) Exception #0 (InvalidArgumentException): Boolean value is expected, supported values: array ( 0 => true, 1 => 1, 2 => 'true', 3 => '1', 4 => false, 5 => 0, 6 => 'false', 7 => '0', ) i just add abstract abstract class News extends Action,

– enjames
Feb 17 '17 at 8:27













@enjames you can update your question with the new code lines?

– Khoa TruongDinh
Feb 17 '17 at 8:39





@enjames you can update your question with the new code lines?

– Khoa TruongDinh
Feb 17 '17 at 8:39













You tried to var_dump() what? You tried to use var_dump and then show the new error?

– Khoa TruongDinh
Feb 17 '17 at 9:03





You tried to var_dump() what? You tried to use var_dump and then show the new error?

– Khoa TruongDinh
Feb 17 '17 at 9:03

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f160407%2ferror-in-custom-admin-menu-controller-magento-2%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Disable / Remove link to Product Items in Cart Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How can I limit products that can be bought / added to cart?Remove item from cartHide “Add to Cart” button if specific products are already in cart“Prettifying” the custom options in cart pageCreate link in cart sidebar to view all added items After limit reachedLink products together in checkout/cartHow to Get product from cart and add it againHide action-edit on cart page if simple productRemoving Cart items - ObserverRemove wishlist items when added to cart

Helsingin valtaus Sisällysluettelo Taustaa | Yleistä sotatoimista | Osapuolet | Taistelut Helsingin ympäristössä | Punaisten antautumissuunnitelma | Taistelujen kulku Helsingissä | Valtauksen jälkeen | Tappiot | Muistaminen | Kirjallisuutta | Lähteet | Aiheesta muualla | NavigointivalikkoTeoksen verkkoversioTeoksen verkkoversioGoogle BooksSisällissota Helsingissä päättyi tasan 95 vuotta sittenSaksalaisten ylivoima jyräsi punaisen HelsinginSuomalaiset kuvaavat sotien jälkiä kaupungeissa – katso kuvat ja tarinat tutuilta kulmiltaHelsingin valtaus 90 vuotta sittenSaksalaiset valtasivat HelsinginHyökkäys HelsinkiinHelsingin valtaus 12.–13.4. 1918Saksalaiset käyttivät ihmiskilpiä Helsingin valtauksessa 1918Teoksen verkkoversioTeoksen verkkoversioSaksalaiset hyökkäävät Etelä-SuomeenTaistelut LeppävaarassaSotilaat ja taistelutLeppävaara 1918 huhtikuussa. KapinatarinaHelsingin taistelut 1918Saksalaisten voitonparaati HelsingissäHelsingin valtausta juhlittiinSaksalaisten Helsinki vuonna 1918Helsingin taistelussa kaatuneet valkokaartilaisetHelsinkiin haudatut taisteluissa kaatuneet punaiset12.4.1918 Helsingin valtauksessa saksalaiset apujoukot vapauttavat kaupunginVapaussodan muistomerkkejä Helsingissä ja pääkaupunkiseudullaCrescendo / Vuoden 1918 Kansalaissodan uhrien muistomerkkim

Adjektiivitarina Tarinan tekeminen | Esimerkki: ennen | Esimerkki: jälkeen | Navigointivalikko