Media revision shows 'Anonymous (not verified)' instead of correct user when using 'Media Entity DropzoneJS with edit' widget in Entity Browser.

Created on 28 May 2025, about 2 months ago

Problem/Motivation

When using the Entity Browser module with the DropzoneJS widget plugin "Media Entity DropzoneJS with edit" configured on a media field of a content type (such as Article or Basic Page), uploaded media files have their revisions incorrectly attributed to "Anonymous (not verified)" instead of the actual logged-in user (e.g., admin). This causes confusion and inaccurate tracking of media ownership and revision history in Drupal.

Steps to reproduce

  1. Install the Entity Browser module and the DropzoneJS module.
  2. Create a new Entity Browser instance.
  3. In the widget settings of the Entity Browser, add the "Media Entity DropzoneJS with edit" widget plugin.
  4. Create a new media field on a content type (e.g., Article or Basic Page), and configure it to use the newly created Entity Browser.
  5. Add a new content item or edit an existing one of that content type.
  6. Upload a media file using the DropzoneJS widget in the media field.
  7. Save the content item.
  8. View the associated media entity and check its revision log.

Expected behavior:

The media revision should show as authored by the current user (e.g., admin).

Actual behavior:

The media revision shows as authored by "Anonymous (not verified)".

Proposed resolution

Update the media entity revision process when uploading files through the "Media Entity DropzoneJS with edit" widget in the Entity Browser to correctly assign the revision author as the authenticated user performing the upload, instead of defaulting to "Anonymous (not verified)". This may involve ensuring the current user context is properly passed and respected during the media entity save operation triggered by DropzoneJS within the Entity Browser widget.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India saiprasad_g

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