Media library widget reset button redirects user to access denied page.

Created on 26 July 2023, 11 months ago
Updated 11 March 2024, 4 months ago

Problem/Motivation

In the media widget Views (both grid and table displays), I tried enabling the reset button option in the exposed form settings as this gives a better UX to content editors.

While enabling the option does show the reset button in the widget, clicking it redirects to /admin/content/media-widget/image?name=&sort_by=created&op=Reset with an "Access Denied" error.

I'm not sure if the root cause is the similar issue I found: https://www.drupal.org/project/drupal/issues/3346820 ๐Ÿ› On views with AJAX enabled, exposed filter "reset" causes page load Active or if the media library widget has a bug itself causing the issue.

Steps to reproduce

  1. Go to: /admin/structure/views/view/media_library/edit/widget and enable the Reset button option in the exposed form settings.
  2. Add a node or other entity that has a media reference field, with the form mode set to use the media library widget.
  3. In the media library widget filter the results in some way, this should then show the reset button.
  4. Click the reset button to reset the form filter options.
  5. You should be redirected to /admin/content/media-widget/image?name=&sort_by=created&op=Reset with an "Access Denied" error.

Proposed resolution

Fix bug so that the reset button on media library widget form correctly resets the form.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

๐Ÿ› Bug report
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Mediaย  โ†’

Last updated about 12 hours ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States PCate

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

Comments & Activities

Production build 0.69.0 2024