Skip Navigation

Resolved

Reported for: WPML Multilingual CMS 4.4.10

Resolved in: 4.5.1

Overview of the issue

In some scenarios, when you add a dropdown language switcher, you will find this error in the browser console:

Source map error: Error: request failed with status 404
Resource URL: …/wp-content/plugins/sitepress-multilingual-cms/templates/language-switchers/legacy-dropdown/script.min.js?ver=1
Source Map URL: script.min.js.map

Workaround

You can temporarily ignore this error, this file is only requested when you open the dev tools, so there will no 404 errors and the loading time for visitors and bots won’t be impacted. You can read more about it here or here.

This error is already reported to our developers and it will be fixed in the future versions of WPML.

20 Responses to “JS Source map file missing for dropdown language switchers”

  1. As a workaround I did create empty files via linux console

    touch /home/web/site.com/public_html/wp-content/plugins/sitepress-multilingual-cms/templates/language-switchers/legacy-list-horizontal/style.min.css.map^C

    touch /home/web/site.com/public_html//wp-content/plugins/sitepress-multilingual-cms/templates/language-switchers/menu-item/style.min.css.map

    By my opinion, keep 404 error code is bad practice for SEO, however this trick avoid it.

    The error

    Could not parse content for …… Unexpected end of JSON input

    Is just functional JS notice instead of 404

  2. I have the same issue.
    Would be great, if the next major release would come soon.
    We are already waiting for 3 months now …

    • Hello there,
      We will be shipping this fix in our next major release which is available in beta now.
      Sorry for the inconveniences.

  3. Hi,

    This is open since May – could you please update on the timeline for a fix here. Its been half a year now since this has been reported.

    regards,
    Peter

    • Hi Peter,
      This fix will be ship within our next major release. Unfortunately we can’t provide your an ETA but you can test our 4.5.0-b.2.1 in your develpement site.
      We will update it here as soon as it is available.
      Regards

  4. It’s very easy to solve this. They added a line in style.min.css referencing this non-existent file.

    Just remove this comment from style.min.css and the error disappears:

    /*# sourceMappingURL=style.min.css.map */

  5. This new release. 4.5.0, did not fix the issue.

    I know it may appear unimportant and cosmetic, but our site requires a clean bill of health on the inspector side.

    I did try this previous suggestion based on data from davidM-255: /*# sourceMappingURL=style.min.js.map */

    Why is this so hard to fix?

  6. Hi there,
    our license expired, which is fine for us since we do not need updates in regards to features.
    However, this bug in 4.4.10 is causing us serious SEO trouble right now. Can you please release a hotfix for this? Since our last purchased version seems to be broken in regard to this, we kindly ask for a fix of this isolated issue.
    Thank you

    • Hello there,
      This issue should have been solved with our latest WPML version. Don’t hesitate to make a full backup before proceeding as it is a major release.
      Regards