Sometimes I see that data submitted to last form is still affecting current action.
For example :
There is a an createAction where new data is added and saved to DB. On successful save, I redirect it to search result page.
if ($file->save() == true ) {
$this->flash->success(_("File uploaded successfully"));
return $this->dispatcher->forward([
'action' => 'search'
]);
}
By deafult search action should just show all the items from that Modal but it only shows last uploaded file. So data sent in previous $_POST is also processed by search action ie. next action where I forwarded flow. And I have confirmed this by multiple tests.
Probalbly I am missing something obvious, kindly advice.