Support » Theme: OceanWP » common.css.map return 404 error

  • Hi team,

    I have created a function to log 404 errors to a file.

    Do you know why I have a large number of errors on the following line: plugins/ocean-extra/includes/freemius/assets/css/admin/common.css.map?

    Thank you in advance for your suggestions

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @thomhsb,

    A SourceMap is a mapping between the generated/transpiled/minified JS file and one or more original source files. The main purpose of SourceMap is to help with debugging, and it does not hurt your website.

    If you are using Google Chrome:
    Go to the developer tools (F12 in the browser);
    Select the Cogwheel in the upper right corner;
    In the Preferences tab (left) look for Sources;
    Disable the options: “Enable javascript source maps” and “Enable CSS source maps”.

    Best Regards

    Thread Starter thomhsb

    (@thomhsb)

    Hello @skalanter ,

    Thank you very much for your explanations and support but that’s not what I was asking and I think I misspoke.

    Here is my function. It simply writes in a text file all the urls related to a page but also to a file (css, js, img) not found. For example, if the page exists but the code calls for an image not found, I get the url of the missing image from the text file.

    add_action('get_header', function(){ 
    if(is_404()){ 
    write_404($_SERVER['REQUEST_URI']);
    }
    });
    
    function write_404($location){ 
    $logs .="IP: "._get_ip()." | url : $location";
    writelogs($logs, "errors404"); // function that writes to the errors404.txt file
    }

    This file regularly contains a large number of lines concerning a file named “common.css.map” whose url is: plugins/ocean-extra/includes/freemius/assets/css/admin/common.css.map

    I was wondering why the theme (or wordpress) was calling this compiled css file when it doesn’t exist? And why it is going to look for it in the ocean-extra directories?

    Hello @thomhsb,

    Thank you for your patience.

    We’ve received feedback from Freemius, as this is part of their code, and this is the explanation that follows:
    “The missing .map file doesn’t cause any issue. The warning shows up since the COMMON.CSS file ends with a comment that tells the browser to look for a specific map file, but the browser couldn’t find it since it’s not supposed to be included in an SDK release. However, this issue will be solved in future updates when the CSS files are compiled in the next SDK release”.

    Best Regards

    Thread Starter thomhsb

    (@thomhsb)

    Hello @skalanter,

    Thank you very much for looking for an answer.

    I understand now, great.
    I could see that it had no impact but I like to understand the cause of the errors I detect.

    And as it pointed to the ocean-extra directory, I took the liberty of asking you.

    Thanks again, have a nice day,
    Thomas

    You are welcome.
    Have a wonderful day.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.