cancel
Showing results for 
Search instead for 
Did you mean: 

admin dashboard static resources problems

SOLVED

admin dashboard static resources problems

hi,

this is a brand new install.  version 2.4.3 lot of work!  using vagrant on a debian box.  no data imported.

 

have tried flushing cache and regenerating static content.  to no avail.

 

if i go to my dashboard home, everything looks good.  however, when i go to various pages off the admin, the header has a lot of extra padding, and the left margin looks to be not enough.  here is a screenshot:

 

i have literally not configured anything with regards to html or css here.

 

if i go into my admin using an incognito window, my images and static resources do not load properly, which i am thinking is a browser cached situation,  ie, this image:

 

//mag/static/adminhtml/Magento/backend/en_US/images/magento-icon.svg

 

Spoiler
 


is cached in my browser, as it does not come up in my incognito window, but comes up in my normal window.

 

i am thinking there is something adrift with my static resources; but i am not seeing any console errors in my dev tools.

 

any help would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: admin dashboard static resources problems

ok, the problem seems to revolve around the isMenuFixed function in javascript.  if the menu is fixed, the display is correct; if that function returns false, then the page display is all off.  at least that is what i have figured out so.

View solution in original post

4 REPLIES 4

Re: admin dashboard static resources problems

Hi @prose_la,

 

Greetings!

 

I understood your problem with a fresh installation. I have faced this problem earlier and I tried the following solution. 

 

First Open “Validator.php” file located in the following path. vendor\magento\framework\View\Element\Template\File\Validator.php
find the function :

protected function isPathInDirectories($path, $directories)

Now inside this function find this line of code.

$realPath = $this->fileDriver->getRealPath($path);

And replace this line of code with the below code.

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

Now compile your Magento by using commands:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:flush

Hope this will help you to solve the problem.

If still have the same issue, contact us.

 

Solved?

Click KUDOS and accept as a solution.

Thank you!

Re: admin dashboard static resources problems

thanks for helping.

 

unfortunately this solution did not address my formatting issues.

Re: admin dashboard static resources problems

its curious.  if i go to system -> cache management, the admin displays fine,

 

if i go to system -> index management, the display is off as indicated by my initial post.

Re: admin dashboard static resources problems

ok, the problem seems to revolve around the isMenuFixed function in javascript.  if the menu is fixed, the display is correct; if that function returns false, then the page display is all off.  at least that is what i have figured out so.