Solved: Admin Menu Not Working After Upgrading to Magento 2.4.4
Is your Magento 2 admin menu not working after upgrading to Magento 2.4.4? If yes, then here is the solution!
Magento 2.4.4 was released by Adobe on April 12, 2022, with plenty of system improvements, bug fixes, and new features. The latest version of Magento 2 is faster, better, and more secure than the older versions. However, some store owners complain that their Magento 2 admin menu not working after upgrading to Magento 2.4.4. The issue is produced when the JS bundling and script modification are enabled. The console displays the following error:
Uncaught SyntaxError: Unexpected token ‘const’
If you are also facing the same issue and your admin panel menu is not working after upgrading to Magento 2.4.4, this blog post is for you.
In this post, I will provide the steps to solve the Uncaught SyntaxError: Unexpected token ‘const’ error in Magento 2.4.4.
Let’s begin!
Steps to Solve ‘Unexpected Token const’ Error in Magento 2.4.4
To solve the unexpected token ‘const’ error in Magento 2.4.4, carefully follow the steps mentioned below:
Step 1: Go to lib/web/jquery/bootstrap/ path and open the collapse.js file.
Step 2: Make changes in the file as shown in the screenshot below, or replace it with this collapse.js file.
Step 3: Now, open tab.js file at lib/web/jquery/bootstrap/.
Step 4: Make changes in the file shown in the screenshot below, or download this tab.js file and replace it.
That’s it! Now, you can use the Magento 2 admin panel menu even if the JS bundling and script modification are enabled.
Similarly, many store owners also reported Magento admin login issues. In case you are facing any such error you can refer to this solution: Admin Login Issue After Upgrading to Magento 2.4.4
Conclusion
The Magento 2 unexpected token const is a common error that the admins face after upgrading to Magento 2.4.4. If your admin menu not working after upgrading to Magento 2.4.4, you can use this tutorial to solve it. I hope this solution will help you solve the Magento 2 admin menu not working issue. If you still have any queries or doubts, feel free to comment, and I will be happy to help you. You can also solve navigation menu not showing in Magento 2 error, as top navigation menu makes it easy for visitors to navigate through the Magento 2 store.
Also, do not forget to share this Magento 2 solution with your developer friends via social media. 😀
Thanks for reading! 🍀
Similar Posts:
- Fatal Error: Uncaught Error: Call to a Member Function getSectionNames() After Upgrading Magento 2
- Fixed: Default Magento Logo Displayed After Upgrading to Magento 2.4.3
- Fixed: Default Magento Logo Displayed After Upgrading to Magento 2.4.3
- Solved: Argument Passed Must Be Array, Null Given Error in Magento 2 Admin Grid
2 Comments
Thank you, this was exactly the problem I was having, and this did the trick!
Well, not straight away, but after I redeployed static content (bin/magento setup:static-content:deploy), and to be on the safe side I then did bin/magento cache:flush, and cleared browser cache, and bingo 🙂
Hello Doug,
We’re glad to know that the above solution worked for you.
Thank You