I think I tried all the suggested method. But not working.

php bin/magento setup:static-content:deploy

php bin/magento indexer:reindex

I also deleted cache, changed permission of pub/static to 777. Nothing did help.

Admin login page design is also broken. But once logged in, then everything looks fine.

On the browser, error message says, "404 not found" and "Script from [URL] was blocked due to mime type mismatch" for the css and javascript files

What could be wrong?

  • are you getting any error ? Check in core_config_data table that your css or js are merged or not? – BornCoder Feb 2 '17 at 13:46
  • in system log, nothing. Also nothing in the error_log of the root folder. – rtk0407 Feb 2 '17 at 13:50
  • Try deleting these directories: pub/static/frontend/ and var/view_preprocessed and then run the static-content:deploy command again. – Ben Crook Feb 2 '17 at 14:38
  • tried that, but also not working – rtk0407 Feb 2 '17 at 14:42

Try disabling static content versioning:

From your MySQL:

update core_config_data set value=0 where path='dev/static/sign';

Then from CLI:

php bin/magento cache:flush
php bin/magento setup:static-content:deploy

Sometimes, do not ask me why, it simply fails and disabling content versioning fixes it.


Finally found the reason.

When you restore from backup of the filesystem_code, it doesn't create update folder at the root.

The previous magento installation which crashed still had the update folder, so I copied this folder to the newly restored folder.

Also make sure to have /pub/static.php, /pub/static/.htaccess and /var/.htaccess files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.