cancel
Showing results for 
Search instead for 
Did you mean: 

Error Request validation failed for action "Magento\Framework\App\Action\Forward\Interceptor"

Error Request validation failed for action "Magento\Framework\App\Action\Forward\Interceptor"

Hello,

 

Can anyone help me in resolving this error? I am getting this error in my Extension.

My extension is compatible with Magento 2.3.2 and after Upgrade the Magento to 2.3.3 the extension is giving this error Error Request validation failed for action "Magento\Framework\App\Action\Forward\Interceptor".

 

Here is my custom module routing code which is giving an error in the latest version of Magento.

 

public function match(\Magento\Framework\App\RequestInterface $request)
{
$identifier = trim($request->getPathInfo(), '/');
$d = explode('/', $identifier, 3);

if (isset($d[0]) && ($d[0] != 'xyz')) {
return false;
}

$request->setModuleName('xyz')->setControllerName('index')->setActionName('index');

$request->setAlias(\Magento\Framework\Url::REWRITE_REQUEST_PATH_ALIAS, $identifier);
$request->setParam('isAjax', true);
return $this->actionFactory->create(
'Magento\Framework\App\Action\Forward',
['request' => $request]
);
}

 

Thanks,

 

2 REPLIES 2

Re: Error Request validation failed for action "Magento\Framework\App\Action\Forward\Intercepto

Hello @rahul_yadav8 

 

If your request is not served with Ajax then please set following and check.

$request->setParam('isAjax', true);

to

$request->setParam('isAjax', false);

I hope it helps.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: Error Request validation failed for action "Magento\Framework\App\Action\Forward\Intercepto

Hello @Meetanshi ,

 

Thanks for your response, but this is also not working. I am getting the same error after the changes you provided.

 

Looking forward to your response!!

 

Thanks,