1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Strange 404 Javascript call

Discussion in 'Troubleshooting and Problems' started by Andy.N, Aug 22, 2013.

  1. Andy.N

    Andy.N Well-Known Member

    My site is behind SSL and for some reason, today the site is not loading the secure contents using Chrome latest. The console shows that
    GET https://www.quantnet.com/js/jquery/jquery-1.10.1.min.map 404 (OK)

    I don't know which template calls that but it does not appear there is such a file. I'm using XF 1.2.1
  2. Mike

    Mike XenForo Developer Staff Member

    You're likely only seeing it in the console. It's part of jQuery to allow mapping of minified files back to unminified ones. It's safe to ignore.
  3. Andy.N

    Andy.N Well-Known Member

    I would like to ignore that, Mike but it's the first time I see that and it caused my site to throw up tons of errors.
    Not sure if anything I can do? Is it loading for you?

    I have over 100+ warning that the site is loading unsecure contents but when clicking on each line, it shows the correct https url.
  4. Mike

    Mike XenForo Developer Staff Member

    The issue is that your <base> tag is wrong:

    <base href="http://www.quantnet.com/"/>
    I see that the HTML has been modified, so it might be related to whatever is doing that.

    Alternatively, if you're using a reverse proxy setup (or even nginx with a fast CGI server), you need to ensure that the correct header/env value is set to detect that HTTPS is used and passed to PHP (usually the "HTTPS" value).
    Andy.N likes this.
  5. Andy.N

    Andy.N Well-Known Member

    Yes, you are right. I did nothing last night and wake up this morning to find this issue.
    Looking at the fastcgi params and it comments out the HTTPS. Not sure why that is. So I turn it on again and restart the server and it works again. Or it should for you as well.

    I found that people run into problems with the js min.map not found as well, as reported on Wordpress forum
  6. MattW

    MattW Well-Known Member

  7. Chris D

    Chris D XenForo Developer Staff Member

    I've started seeing this on one of my dev installs.

    I've just put the file it's looking for into the relevant folder and of course that makes the error go away. The map file can be downloaded here: http://code.jquery.com/jquery-1.10.1.min.map

    Interestingly, I was beginning to question why I don't see this very often on other sites and I haven't seen it before on my own. Turns out that on my current dev install I hadn't bothered setting the jQuery Source to the Google CDN like I normally do and like most XenForo sites do.

    Presumably, if you load the jQuery from a CDN, then the map file is also accessed from the CDN (where presumably it exists as enabling the source from a CDN makes the error go away).

    With all that being said, why doesn't XenForo simpy include the map file to ensure the error doesn't show? Presumably Google is seeing the 404s when it crawls the site. So it seems like including the local map file would prevent that.
  8. Chris D

    Chris D XenForo Developer Staff Member

    Andy.N and MattW like this.
  9. MattW

    MattW Well-Known Member

    I did exactly the same and added the file myself, as I have my settings set for Locally Hosted jquery

Share This Page