Searching media in entity browser and clicking on "Insert selected" throws Ajax error.

Created on 22 February 2024, 10 months ago
Updated 30 July 2024, 5 months ago

Problem/Motivation

I have Acquia Site Studio enabled and I am adding the media through layout canvas. The layout canvas has an entity browser element with DAM Video and DAM Images enabled.

When i search Image or Video in second tab of Entity browser, select any item and click "Insert selected" it throws AJAX error. This happens only if the media is in the second tab and we have used search atleast once.

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at parse (<anonymous>)

The Ajax callback for insert selected is not called, i noticed that some workaround for form action has been implement for this core issue https://www.drupal.org/project/drupal/issues/2504115 and wonder if there is some edge case that we might have missed.

Steps to reproduce

1. Add entity browser element in layout canvas for any of the node.
2. Enable DAM video and DAM image for the entity browser.
3. Click on browse in layout canvas for the particular component.
4. Go the second tab and search for media.
5. Select any media and click on "Insert selected", the AJAX error should appear in console.

🐛 Bug report
Status

Postponed

Version

1.0

Component

Code

Created by

🇮🇳India saurabhpandit26 Mumbai

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

Comments & Activities

Production build 0.71.5 2024