Skip to content

Invaild security or form key, please refresh your page

i hit the url backendnotification/index/index this error showenter image description here

what is wrong route and controller

this is my route code

    <router id="admin">
        <route id="backendnotification" frontName="backendnotification">
            <module name="Testing_ScheduleContentNotifier"/>
        </route>
    </router>
</config>

This is my controller code under Testing/ScheduleContentNotifier/Controller/Adminhtml/Index/Index.php

<?php
namespace TestingScheduleContentNotifierControllerAdminhtmlIndex;

use MagentoFrameworkAppActionHttpGetActionInterface as HttpGetActionInterface;
use MagentoBackendAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoBackendAppAction;
class Index extends Action implements HttpGetActionInterface
{
    /**
     * @var PageFactory
     */
    protected $resultPageFactory;

    /**
     * @param Context $context
     * @param PageFactory $resultPageFactory
     */
    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }

    /**
     * Index action
     *
     * @return MagentoBackendModelViewResultPage
     */
    public function execute()
    {
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(__('Grid List'));

        return $resultPage;
    }
}