Describe the bug
With enabled locale module from drupal.core I've got message: "Only local files should be passed to _locale_parse_js_file()"
To Reproduce
Can't provide reproduce steps. Try to enable locale, add more than 2 languages and check.
Additional context
While debugging, found that reason was with 'ws-assets://...' in drupal core validation function. Patch as workaround solution:
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 1bf5ba1346..a149ec5618 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -1106,7 +1106,7 @@ function _locale_parse_js_file($filepath) {
$filepath = $parsed_url['path'];
// If there is still a protocol component in the path, reject that.
- if (strpos($filepath, ':')) {
+ if (strpos($filepath, ':') && !str_contains($filepath, "ws-assets://")) {
throw new Exception('Only local files should be passed to _locale_parse_js_file().');
}
Describe the bug With enabled
locale
module from drupal.core I've got message: "Only local files should be passed to _locale_parse_js_file()"To Reproduce Can't provide reproduce steps. Try to enable locale, add more than 2 languages and check.
Additional context While debugging, found that reason was with 'ws-assets://...' in drupal core validation function. Patch as workaround solution: