I have updated the Magento to 2.4.7 recently and updated it to the staging server. I am getting the error that cookieMessagesObservable is not defined in the console and due to this Minicart is not accessible to me and several js are also not loading due to it.
1 Answer
You most likely need to redeploy static content. Either delete all everything in the folders pub/static/frontend and pub/static/adminhtml and run:
php bin/magento setup:static-content:deploy
This might take a few minutes, after make sure your browser isn't caching any of the old files, and refresh this should resolve the problem.
You are looking for a file to update called messages.js it should be in
static/*version*/frontend/*ThemeVendor*/*ThemeName*/Magento_Theme/js/view/messages.js
Hope this helps
static/*version*/frontend/*ThemeVendor*/*ThemeName*/Magento_Theme/js/view/messages.js
But still error was there in the console.