Not using the CDN causes Only local files should be passed to _locale_parse_js_file() error

Created on 22 September 2022, almost 2 years ago
Updated 17 March 2023, over 1 year ago

Problem/Motivation

Exception: Only local files should be passed to _locale_parse_js_file(). in _locale_parse_js_file() (line 1110 of core/modules/locale/locale.module) if thrown when CDN is disabled and trying to edit or add a node containing a masked field.

Steps to reproduce

  • add a text field to any content type and set its form display to use a mask
  • uncheck the Use a CDN setting in /admin/config/content/mask
  • try to add or edit a content type containing a field using a mask
  • boom
  • recheck the CDN, add/edit the node, all is fine

Error is reported on Drupal 9.4.5 and 9.4.6 installed with French language only and using mask 2.0.0-alpha1 or lastest dev releases.
DB updated and caches cleared.

πŸ› Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Closed: cannot reproduce over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ
  • πŸ‡«πŸ‡·France Cyril42 Mayenne

    I reproduced this issue, (Drupal 10), I would like to manage the js file in my theme, not in public folder (to have the file in git).
    Do I have a way to do that ?

    Uncheck CDN cause this issue. Maybe the plugin should let the developper choose how add the js file ?

  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    I’m not following that you can reproduce this. You can place the file where you want. Maybe download it by composer or another way.

    Did you try what you suggested and got an error?

    Uncheck CDN cause this issue. Maybe the plugin should let the developper choose how add the js file ?

    That’s why the option is there to not use CDN and a text field to provide a path, not?

Production build 0.69.0 2024