0

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.

3
  • Have you tried running your static file deploy? php bin/magento setup:static-content:deploy Commented Sep 19, 2022 at 19:46
  • Yes. The strangeness is that the whole admin panel works, the problem is only in one module. Commented Sep 19, 2022 at 20:01
  • How are you importing the file into your module? Are you using a layout file, or are you including it in the PHTML directly? If you are including it directly that may be the issue, magento may be minifying the file and serving at yourfile.min.css or the version number may have changed since you included it. It is typically best to include it using a layout file, as magento will handle determining the url. Commented Sep 19, 2022 at 20:04

1 Answer 1

1

Problem was in OPcache. He cached them very much, so the site as a whole did not work correctly.

Your Answer

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.