JS error that field group is not defined in media library

Created on 9 January 2024, about 1 year ago
Updated 5 June 2024, 8 months ago

Problem/Motivation

Currently when I am using a field group with tabs and I tried to add a media file to the page, I get a console error.

The error is
Uncaught TypeError: can't access property "Effects", Drupal.FieldGroup is undefined.

Steps to reproduce

We have a content type where the fields are displayed in tabs. The error happens at least in paragraph items with a media entity field.

1. Select a tab in the content type with the field with media item.
2. Click on the select media button that opens the media library.
3. Try to search and filter the media listing. The console error pops up multiple times when filtering the media library.

The error comes from here https://git.drupalcode.org/project/field_group/-/blob/8.x-3.x/js/field_g....

Proposed resolution

We should check that Drupal.FieldGroup is defined before running the each function.

Remaining tasks

- Code changes
- Possible test coverage

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Closed: duplicate

Version

3.4

Component

Miscellaneous

Created by

🇫🇮Finland heikkiy Oulu

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024