Opened 8 months ago
Last modified 7 weeks ago
#58051 assigned defect (bug)
Attachment custom fields not rendered after upload
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | 6.2 |
Component: | Media | Keywords: | needs-patch |
Focuses: | accessibility, javascript | Cc: |
Description
This is a follow-up to #40909.
Attachment custom fields added via attachment_fields_to_edit
are no longer rendered just after an image is uploaded.
Clicking away and back will restore the custom field markup, but is quite inconvenient.
Attachments (3)
Change History (47)
#1
@
8 months ago
- Milestone changed from Awaiting Review to 6.2.1
- Owner set to joedolson
- Status changed from new to accepted
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
8 months ago
#4
@
8 months ago
Possible ideas include reinitializing the frame after an upload, reverting the change in 40909, and providing the initialize method that was removed with context for where focus should be. But this needs further exploration.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
8 months ago
This ticket was mentioned in PR #4315 on WordPress/wordpress-develop by @adamsilverstein.
8 months ago
#6
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/58051
#7
@
8 months ago
@joedolson what about something like 58051.diff which triggers the render on the add
callback instead? I tested this (briefly) and I see the fields (immediately after uploading completes) - also the focus issue from #40909 still appears resolved.
@trepmal does this fix your issue or cause any unexpected side effects?
This ticket was mentioned in Slack in #core-media by adamsilverstein. View the logs.
8 months ago
#10
@
8 months ago
- Keywords commit added; reviewing removed
Test steps:
Failure case:
1) Set up custom fields using code sample on #40909
2) Go to add a featured image to a post.
3) Upload image by dropping into thumbnail grid within the media modal.
4) Verify that attachment fields do not display.
Success case:
1) Apply patch and build.
2) Go to add a featured image to a post.
3) Upload image by dropping into thumbnail grid within the media modal.
4) Verify that attachment fields do display.
5) Add content to test field 1; tab forward to observed focus. Observe that focus stays in field 2.
Tested patch and verified test results as expected.
Marking for commit.
This ticket was mentioned in PR #4322 on WordPress/wordpress-develop by @joedolson.
8 months ago
#11
Test against media changes to render attachment fields on new uploads.
Trac ticket: https://core.trac.wordpress.org/ticket/58051
#15
@
8 months ago
I'm encountering the bug described here and I wanted to pop in and note that I've tested the patch attached on this ticket and it successfully resolves the problem.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
8 months ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
7 months ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
6 months ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
5 months ago
This ticket was mentioned in Slack in #core by mark. View the logs.
5 months ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
5 months ago
#25
@
5 months ago
- Keywords early added
- Milestone changed from 6.2.1 to 6.4
- Resolution fixed deleted
- Status changed from closed to reopened
This issue seems to still be happening in certain frames. For instance if you upload an attachment using a custom media library button in something like a custom field, a newly uploaded item will not render the custom fields as expected. Moving this to 6.4 for investigation and a fix. I've been working on a fix for a bit now and am close. Marking early.
This ticket was mentioned in Slack in #core-media by costdev. View the logs.
4 months ago
#28
@
4 months ago
- Keywords needs-patch added; has-patch commit early removed
I've removed the early
keyword. Why?
The handbook explains the keyword as:
This keyword should only be applied by committers. The keyword signals that the ticket is a priority, and should be handled early in the next release cycle.
early
means the commits need to happen during the early part of the Alpha cycle; else, the ticket gets bumped.
Though it would be great to prepare the work for commit as early as possible, commits for this ticket should not be constrained to only happen during the early Alpha phase. Rather, defect commits can happen up to 6.4 RC 1.
To aid in 6.4 tracking and scrubs, I've removed the early
keyword.
I've also reset the keywords to reflect the ticket's current state.
#29
@
3 months ago
- Keywords fixed-major removed
Since this was already committed in 6.2 / 6.2.1, wouldn't it be better from a workflow perspective to open a new follow-up ticket? IIRC that's how we've done that in the past for such cases.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
3 months ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
3 months ago
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
3 months ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 months ago
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
2 months ago
#36
follow-up:
↓ 38
@
2 months ago
This looks to be fixed now. I'm going to dig into what changed but I have been able to verify that custom media library buttons and the featured image flow mentioned in #59308 are working
Here's a video showing newly uploaded files are rendering with the field correctly: https://streamable.com/3fieiz
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 months ago
#38
in reply to:
↑ 36
;
follow-up:
↓ 39
@
2 months ago
Replying to antpb:
This looks to be fixed now. I'm going to dig into what changed but I have been able to verify that custom media library buttons and the featured image flow mentioned in #59308 are working
Here's a video showing newly uploaded files are rendering with the field correctly: https://streamable.com/3fieiz
@antpb, in which version of WordPress are you saying this has been fixed? Your video does not demonstrate that the issue in #59308 has been fixed as it is showing a fresh image upload. My issue only occurs when you click on an already attached featured image in combination with there needing to be many images in the media library such that the image you opened is not on the first page. If you want I can make a video that shows the bug in #59308?
#39
in reply to:
↑ 38
@
2 months ago
hi @SeBsZ , a video would be very helpful if you could test on nightly. I was using trunk for my tests last night and found that this issue were in now 58051 is no longer reproducible. Could you try it for the featured image flows you mentioned in the other issue and leave a video there? That'll help me find a fix.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 months ago
#41
@
8 weeks ago
Hi @SeBsZ! Could you take a look at #comment:39?
#42
@
8 weeks ago
@nicolefurlan @SeBsZ already provided the screencast and a full repro, but in the appropriate ticket, which is https://core.trac.wordpress.org/ticket/59308#comment:3.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
7 weeks ago
#44
@
7 weeks ago
- Milestone changed from 6.4 to 6.5
I used the code from https://core.trac.wordpress.org/ticket/59308#comment:3
and when I had few images uploaded this new field was appeared, but when I added more imaged to the Media library this bug started to appear.
We don't have patch yet and because we have 3 days before RC1, I am moving it into the next milestone.
demonstration of behavior