WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#44620 closed defect (bug) (fixed)

Attachment Details modal shouldn't manually construct the edit link

Reported by: johnbillion Owned by: johnbillion
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch fixed-major fixed-5.0
Focuses: Cc:

Description

In the template for the Attachment Details modal, the URL of the Edit more details link is manually constructed using post.php?post={{ data.id }}&action=edit.

This means the URL may not be correct if the actual attachment editing URL is filtered and changed. The template should use {{ data.editLink }}.

Attachments (1)

44620.diff (692 bytes) - added by johnbillion 2 years ago.

Download all attachments as: .zip

Change History (13)

@johnbillion
2 years ago

#1 @johnbillion
2 years ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in Slack in #core-media by mike. View the logs.


2 years ago

#3 @joemcgill
2 years ago

@johnbillion Looks right to me.

#4 @johnbillion
2 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 43601:

Media: Ensure the "Edit more details" link in the attachment details modal always points to the correct editing URL.

Fixes #44620

#5 @johnbillion
2 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#6 @johnbillion
2 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43602:

Media: Ensure the "Edit more details" link in the attachment details modal always points to the correct editing URL.

Fixes #44620

Merges [43601] to the 4.9 branch.

#7 @pento
2 years ago

  • Keywords fixed-major removed
  • Milestone changed from 4.9.9 to 5.0
  • Resolution fixed deleted
  • Status changed from closed to reopened

[43601] can be ported to 5.0. After 5.0, [43602] needs to be reverted from the
4.9 branch (add fixed-major after the port, and leave the issue open).

#8 @johnbillion
2 years ago

  • Status changed from reopened to accepted

#9 @SergeyBiryukov
2 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 43718:

Media: Ensure the "Edit more details" link in the attachment details modal always points to the correct editing URL.

Merges [43601] to the 5.0 branch.
Fixes #44620.

#10 @SergeyBiryukov
2 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for a revert from the 4.9 branch per comment:7.

#11 @pento
2 years ago

  • Keywords fixed-5.0 added

#12 @peterwilsoncc
2 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43948:

Media: Revert [43602] from the 4.9 branch.

Reverts changes to the "Edit more details" link in the attachment details modal.

This is out of scope for 4.9.9 and will be re-introduced in 5.0.0.

Fixes #44620.

Note: See TracTickets for help on using tickets.