"Edit Media" in media name conflicts with redirecting to media item edit screen

Created on 3 October 2023, about 1 year ago

Problem/Motivation

There is a feature in this module that looks for "edit-media" in the path and redirects to the media item's edit screen if found. If I save a media item with the name "The Edit Media Dilemma", then I get redirected to the edit screen even though the query parameter isn't in the request.

Steps to reproduce

1. Create a media item with the name "The Edit Media Dilemma".
2. Try to go to the media alias in a browser.
3. Get redirected to the media item's edit screen.

Proposed resolution

Update the code to search for a query parameter called "edit-media" instead of searching the whole path. This is certainly an edge case, but it could affect some users.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States afinnarn

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

Comments & Activities

Production build 0.71.5 2024