2

When I view the browser console whilst viewing the Dashboard for instance, I get a whole load of 404s for Javascript .map files. For example on a fresh update to v2.3 I get this lot reported as missing:

/admin/resources/lib/garnish-0.1.min.js/garnish-0.1.min.map/
/admin/resources/js/craft.js/craft.min.map/
/admin/resources/js/cp.js/cp.min.map/
/admin/resources/js/QuickPostWidget.js/QuickPostWidget.min.map/
/admin/resources/js/RecentEntriesWidget.js/RecentEntriesWidget.min.map/
/admin/resources/js/GetHelpWidget.js/GetHelpWidget.min.map/
/admin/resources/js/UpdatesWidget.js/UpdatesWidget.min.map/
/admin/resources/js/FeedWidget.js/FeedWidget.min.map/ 

It just looks like the paths a wrong, if I look in the /js/ folder, the .map files do actually exist.

Is it something I should be concerned about? Everything seems like it's all working ok, so it's not a show stopper at all. I just find it a bit annoying to be honest, so if I can do something to turn off the requests that'd be nice.

EDIT: Solution

As per Jason's answer below, I had the following rule in my .htaccess file to add trailing slashes:

RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+[^/])$ /$1/ [R=301,L]

I removed that and it has cured the issue. I have subsequently put the rule back in and the problem hasn't returned so it must have been cached somewhere.

3
  • Can you try clearing your browser's cache? If it's still an issue and it's on a public box, send some CP/FTP credentials over to [email protected] and we'll look at it and update here with any findings.
    – Brad Bell
    Commented Dec 3, 2014 at 22:35
  • Thanks Brad. I've tried clearing the cache to no avail. I'll get it on a public machine early next week and ping some credentials over to you, Cheers. Commented Dec 4, 2014 at 16:38
  • I've the same issues ... missing .min.map files for "cp.min.map", "fields.min.map", "craft.min.map" and "garnish-0.1.min.map" while viewing the dashboard. I use the provided .htaccess file in an multilingual environment. Any news on how to resolve this?
    – m9dfukc
    Commented Feb 19, 2015 at 14:09

1 Answer 1

3

If you are hosting on an Apache server, check your rewrite rules. The output provided appears to be appending a / to the end of the URL - which would most likely return a 404 error as it thinks the file is actually a directory.

To be more specific, check for any rewrite rules that add a trailing slash to directories (or in general). That is most likely the culprit.

Hope that helps.

4
  • That's exactly it! I had a rule in the htaccess to add missing trailing slashes, took it out and it solved the problem. I've since put it back and the problem hasn't returned so I'm guessing it was cached somewhere. I'm chalking it up to sorcery and quitting while I'm ahead :) Commented Dec 8, 2014 at 10:36
  • Glad that worked out for you, that same problem has caught me a few times in the past! Commented Dec 14, 2014 at 0:27
  • 1
    have the same issue right now but htaccess isn't the culprit, removed htaccess rules to test with no joy. Commented Jan 21, 2015 at 18:15
  • @StevenGrant - wasn't htaccess in my case too, I was using MySQL 5.7 which, as noted here causes an error during installation. After switching to MySQL 5.6.x, installation completed successfully and I no longer receive the 404 errors. Commented Jan 9, 2017 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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