0

On select an option from dropdown, I am getting value in phtml file and from there in js function , i am redirecting to my controllers.

Everything works fine but only admin message notifications are not displaying while i used return $resultRedirect->setRefererOrBaseUrl();

It is redirecting to same page but messages are not displaying. But when i gave $resultRedirect->setPath('/');

It is redirect to dashboard and displaying message at dashboard. but its not working for same page redirect.

Can anyone help me where is the issue ?

Payal Patel
1,5111 gold badge20 silver badges40 bronze badges
asked Sep 20, 2016 at 6:54

1 Answer 1

0

For getting Admin notification, Don't call the block from controller. Always call the block from the layout file only. Otherwise Magento 2 default admin notification like succes , error will not display.

answered Jan 4, 2017 at 7:22
1
  • Please, elaborate the processes and how to call the block from layout file Commented Sep 24, 2021 at 17:37

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.