0

I downloaded BannerSlider from GitHub and pasted the files into the app> code> Magestore. in the admin panel, it showing the manage options but when I click it says Invalid security or form key.

Please refresh the page. I tried changing max input vars to 10000 in php.ini file but no change.

Can anyone help me I am new to Magento I am using PHP 7.3.2.

0

Considering you already tried increasing the max input vars, i recomend you to also:

  • Run on your terminal:

    php bin/magento setup:upgrade; php bin/magento setup:di:compile; php bin/magento cache:clean; php bin/magento cache:flush;

  • Clear your browser cookies;

Usually this error occurs when magento can't recognize the form key in it's validation, either by not receiving it, or by being invalid.

  • it worked but the module was gone – Maksood Aug 19 '20 at 12:43
  • The module was deleted by someone, or simply disappeared? I haven't heard of magento deleting anything from setup commands! – Bruno Felipe Aug 19 '20 at 14:13
0

Please add following code in your admin controller :

protected $request;
protected $formKey;

public function __construct(
\Magento\Framework\App\Action\Context $context,
\Magento\Framework\Data\Form\FormKey $formKey,
\Magento\Framework\App\Request\Http $request
) {
    $this->request = $request;
    $this->formKey = $formKey;
    $this->request->setParam('form_key', $this->formKey->getFormKey());
    parent::__construct($context);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.