• Hello all!

    I am looking for an error message since one week now ??

    The error I get:

    Source map error: request failed with status 404
    Resource URL: https://localhost/~username/test_wordpress/wp-content/themes/wpbootstrap/js/bootstrap.js
    Source Map URL: bootstrap.js.map
    

    What I tried:
    1. look through the file encoding (UTF-8 without BOM, Unix Linefeeds)
    2. looking through all files and folders of extended file attributes (MacOS) and removed one or two with the shell (with command xattr ...)
    3. replaced the path with full or relative path like follows:

    
    <link href="<?php bloginfo('template_url'); ?>/css/bootstrap.css" rel="stylesheet">
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="/Users/username/Sites/wpb_tutorial/wp-content/themes/wpbootstrap/bootstrap.css" rel="stylesheet">
    <link href="~/Sites/wpb_tutorial/wp-content/themes/wpbootstrap/bootstrap.css" rel="stylesheet">
    

    with these replacements the nav bar is appearing, but ugly formatted, which was before beautiful. Only the first link leads to the source map error.

    4. Went to Dashboard and saved the Settings > Permalinks
    5. looked through my httpd.conf setting of my apache-server (but vaguely).
    6. looked for hidden files, specially .httaccess
    7. I changed the permissions of bootstrap.css and enclosing folder to 777
    8. Changed the owner to root …

    I don’t know what to do, how to continue …

    Thank you for your help

    marek

    Ps: just now writing this post, I discovered in the Dashboard Settings > Permalink an remark about .htaccess if this would be writable … So I added an .htaccess file in the root folder with the content:

    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /~mstep/wpb_tutorial/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /~mstep/wpb_tutorial/index.php [L]
    </IfModule>
    

    No help …

    • This topic was modified 5 years, 2 months ago by marek_step.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter marek_step

    (@marek_step)

    Now I uncommented in the httpd.conf the line:

    
    LoadModule rewrite_module libexec/apache2/mod_rewrite.so
    

    Restarted the server … No help! Perhaps logout login in WordPress? One moment please … Still the same …

    • This reply was modified 5 years, 2 months ago by marek_step.

    You can ignore it or open your bootstrap.js and go to the last line and remove the following:

    //# sourceMappingURL=bootstrap.js.map

    Thread Starter marek_step

    (@marek_step)

    @jaycbrf

    Wow! This looks pretty simple! But you have to know it! And I was scratching my head and tearing my hairs …

    Putting the site on the server, is it better to put this line back?

    You earned at least a crate (right word?) of Bavarian beer ??

    LMAO – no you do not need to re-add the line. It just points to the original file before it is minified by a processor.

    https://prnt.sc/p7fw05

    For example, if you were writing SASS and them compiling the SCSS and JS files into minified files in the production folder. The map files tell the compiler where the original files are. They are not needed in any way other than that.

    Case of beer! thnx!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mysterious 404 Server errors on localhost’ is closed to new replies.