DropzoneJS in a modal causes AJAX failures

Created on 22 July 2025, 5 days ago

Problem/Motivation

Steps to reproduce

  1. Configure CKEditor5 to have the in-Core media library, and/or Entity Browser (set up for media items) using DropZoneJS.
  2. Wait for a day or two of regular use. i.e. this problem only happens on live sites, and cannot be recreated on local/dev sites. Something bad gets cached (or something like that)
  3. Create a new node.
  4. In CKEditor click the MediaLibrary or EntityBrowser button. You'll go through a series of AJAX steps in the modal:
    1. Only in EntityBrowser β€” switch to the tab to upload new content.
    2. Using the DropzoneJS widget, upload a new image.
    3. Choose the alt text.
    4. You're now back at the list of all available items. Choose the item that you just uploaded, and click "Insert Selected"

At this point, if you did not do #2 then the normal thing happens: the modal dialogue closes and your image is inserted into CKEditor. If did do #2, then you are instead redirected to the form submission URL, and you see something like this:

The platform where we're experiencing this uses Groups module and each group is on a separate domain. I'm not sure if that's part of the formula.

I did notice that when successful, the final HTTP request is to
/media-library?media_library_opener_id=media_library.opener.editor&[a-bunch-of-other-stuff]
but when it fails it goes to
/media-library/image?[a-bunch-of-other-stuff]
I think that means that in a previous AJAX step the form action was set to the wrong URL.

I realize that this description is wholly unsatisfying. There are several issues in the DropzonJS issue queue that could be related. However, due to the difficulty with reproducing the error, it hasn't been worthwhile to try patches one-by-one. Instead, we've just uninstalled DropzoneJS. So this issue is mostly intended as a marker that others can find and add more details.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

πŸ‡²πŸ‡½Mexico dalin πŸ‡¨πŸ‡¦, πŸ‡²πŸ‡½, 🌍

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

Comments & Activities

Production build 0.71.5 2024