Opened 2 years ago
Closed 19 months ago
#17419 closed defect (bug) (fixed)
Authors see misleading links in media library
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Administration | Version: | 3.1 |
| Severity: | minor | Keywords: | has-patch tested dev-feedback |
| Cc: | mike.schroder@…, kpayne@…, olleicua@… |
Description
Visit the Media Library while logged in as an Author and you'll see each media item's title is a link (with a title attribute of "Edit [title]"), but this link takes you straight back to the media library as you don't have the required capability to edit media items.
Affects 3.1 and trunk.
Attachments (4)
Change History (18)
- Component changed from Role/Capability to Administration
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
comment:2
solarissmoke — 2 years ago
- Keywords has-patch added; needs-patch removed
- Version set to 3.1
comment:3
SergeyBiryukov — 22 months ago
- Milestone changed from Future Release to 3.3
comment:4
johnpbloch — 22 months ago
Tested on trunk. Works fine for me.
comment:5
DH-Shredder — 20 months ago
Tested, and still works for me on trunk. Uploaded version with a bit of formatting cleanup if desired.
comment:6
DH-Shredder — 20 months ago
- Cc mike.schroder@… added
- Cc kpayne@… added
Looks like there's a bug when mixing images that are owned by an author and images that are not owned by an author. For example, see 17419.bug.png. The user "author" uploaded an image, futurama_14, that shows a checkbox and the appropriate edit, delete, and attach links. However, the "author" user is also given checkboxes and attach links for other images.
It looks like the $post object is being reset by The Loop in display_rows() function. Patch 17419.formatted.1.diff should fix this by resetting $user_can_edit after the loop.
Let me know if I missed anything!
- Cc olleicua@… added
tested on Revision #19107. Before patch the attach link was displayed, after it was not. Looks pretty solid. Also some nice cleanup to make the code more readable.
+1
comment:9
kcristiano — 19 months ago
tested on Revision 19193. Works as described
comment:10
nacin — 19 months ago
17419.formatted.1.diff looks good here.
comment:11
nacin — 19 months ago
- Owner set to nacin
- Status changed from new to accepted
comment:13
edwardw — 19 months ago
- Keywords dev-feedback added
comment:14
ryan — 19 months ago
- Resolution set to fixed
- Status changed from accepted to closed
In [19252]:

Same applies for the link on the image thumbnail, the Attach link, and the link to edit the parent post (if attached). See patch.