Problem/Motivation

Uncaught TypeError: Cannot read properties of undefined (reading 'Effects')
    at Object.attach (field_group.js?s6qg5s:34:32)

Add existing media error message

Steps to reproduce

  1. Create content with media field
  2. Try to add existing media
  3. Click on the arrow button to go to the next page with existing media

Proposed resolution

?

CommentFileSizeAuthor
add-existing-media-error.png211.51 KBkrzysztof domański
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Krzysztof Domański created an issue. See original summary.

saidatom made their first commit to this issue’s fork.

heikkiy’s picture

Status: Active » Reviewed & tested by the community

Tested and this seems to fix the error.

maxilein’s picture

Can you please make a patch.

heikkiy’s picture

@maxilein You can get the patch file from the MR: https://git.drupalcode.org/project/field_group/-/merge_requests/44.patch

Note that it's always recommended to save the patch file in local repository and use it from there. The MR patch can change if new commits are added to it might break existing functionality and it's also a possible attack vector because someone could slip malicious code to the MR.

anybody’s picture

Comparing this with https://git.drupalcode.org/issue/field_group-3412511/-/blob/3412511-filt... the fix totally makes sense to me.

I'd vote to order the variables like in the libraries.yml for better compareability and future changes?

nils.destoop’s picture

The commit adds dependencies in the javascript code to once, and drupalSettings. While it is not always used.

I see 3 things that need to happen:
- once should be added in the field_group.field_ui.js file, as it is used there
- drupalSettings should be added to field_group.js
- libraries.yml should be updated as there is no direct dependency to some of those libraries

nils.destoop’s picture

Status: Reviewed & tested by the community » Fixed

I pushed a fix for this on the main branch

Status: Fixed » Closed (fixed)

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