Problem/Motivation
When trying to access a page with a view using the "Full Calendar Display" plugin, if the interface translation is enabled in the site, it crashes with the following message "The website encountered an unexpected error. Please try again later.".
The error that causes this is:
"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)."
Steps to reproduce
Confirm that the module Interface translation (locale) is enabled.
Create a view page using the Full Calendar Display.
Visit the view page.
Proposed resolution
The external libraries in fullcalendar_view.libraries.yml should be declared to be external by specifying "type: external".
Comments
Comment #2
Carlos Marco commentedComment #3
Carlos Marco commentedComment #4
mingsongIt is not necessary always external libraries.
In a situation that the required libraries are download and host on the local, the libraries are not external.
Comment #5
berdirThe problem isn't that they are external. The problem is that they are not *defined* as external, so locale.module gets confused about them, it expects a local file.
An external file must have
type: externalin the definition, so your code that switches the library needs to add that.Example:
Comment #6
berdirHere is a patch that adds the type.
Comment #8
mingsongThanks everyone.
The patch is simple and should be safe.
Pushed to the develop branch.