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".

CommentFileSizeAuthor
#6 fullcalendar-view-3320044-external-6.patch1003 bytesberdir

Comments

Carlos Marco created an issue. See original summary.

Carlos Marco’s picture

Issue summary: View changes
Carlos Marco’s picture

Issue summary: View changes
mingsong’s picture

Status: Active » Closed (works as designed)

It 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.

berdir’s picture

Status: Closed (works as designed) » Active

The 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: external in the definition, so your code that switches the library needs to add that.

Example:

'//cdn.jsdelivr.net/gh/davidjbradshaw/iframe-resizer@v4.2.10/js/iframeResizer.contentWindow.min.js': { type: external, minified: true }
berdir’s picture

Status: Active » Needs review
StatusFileSize
new1003 bytes

Here is a patch that adds the type.

  • Berdir authored b375389a on 5.x
    Issue #3320044 by Berdir, Carlos Marco, Mingsong: External libraries...
mingsong’s picture

Status: Needs review » Fixed

Thanks everyone.

The patch is simple and should be safe.

Pushed to the develop branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.