Skip to content

CSS and JS return 404 in only custom module page (in admin panel)

I write custom module for admin panel. The entire admin panel works correctly. Styles and scripts are loaded everywhere. But custom module page looks like enter image description here

I checked source code. Valid CSS path looks like http://test.ru/static/version1663599491/adminhtml/Magento/backend/en_EN/extjs/resources/css/ext-all.css

But in custom module page I have this – <link rel="stylesheet" type="text/css" media="all" href="http://test.ru/static/version1663599491/adminhtml/_view/en_EN/extjs/resources/css/ext-all.css" /> and this file return 404.

How to fix this problem?

P.S. Magento v 2.4.2.