Make WordPress Core

Opened 5 months ago

Last modified 2 months ago

#58730 new defect (bug)

Media not getting removed from the media library popup after clicking "Delete permanently" button

Reported by: adhun's profile adhun Owned by:
Milestone: 6.5 Priority: normal
Severity: normal Version: 6.3
Component: Media Keywords: has-patch changes-requested has-screenshots
Focuses: ui, javascript, administration Cc:

Description

I encountered an issue while attempting to remove media from the Media Library popup in WordPress. Despite deleting the media file, it remains visible in the popup window, ideally the media should get removed automatically from the window once its deleted permanently.

  1. Log in to the WordPress admin panel.
  2. Navigate to the "Posts" section and select an existing post or create a new one.
  3. Click on the "Set featured image" button within the post editor.
  4. Try to delete a media from the window.
  5. Even after deleting the media file, it remains visible in the popup window.

Video Link : ​https://www.loom.com/share/89321a9eb87d4627ab7a67bbfb54c9a8

Attachments (1)

Screenshot 2023-07-11 at 1.03.04 PM.png​ (159.0 KB) - added by Hareesh Pillai 5 months ago.
While I could replicate the said issue, I also noticed the text "Showing 2 of 1 media items" in the popup below the images list.

Download all attachments as: .zip

Change History (27)

#1 @mukesh27
5 months ago

  • Milestone changed from Awaiting Review to 6.3

Thanks for the ticket.

I also reproduce same issue in Trunk. Moving to 6.3 for visibility.

#2 @ugyensupport
5 months ago

Media not getting removed from the media library popup after clicking "Delete permanently" button

Description

I also encountered an issue while attempting to remove media from the Media Library popup in WordPress. Despite deleting the media file, it remains visible in the popup window, ideally, the media should get removed automatically from the window once it's deleted permanently.

Environment

  • WordPress: 6.3-beta3
  • PHP: 8.0.0
  • Server: Apache/2.4.10 (Debian)
  • Database: mysqli (Server: 5.5.59-MariaDB-1~wheezy / Client: 5.5.62)
  • Browser: Chrome 114.0.0.0 (macOS)
  • Theme: Twenty Twenty-Three 1.1
  • MU-Plugins: None activated
  • Plugins:
    • Gutenberg 16.1.1
    • WordPress Beta Tester 3.5.0

Steps to Reproduce

  1. Log in to the WordPress admin panel.
  2. Navigate to the "Posts" section and select an existing post or create a new one.
  3. Click on the "Set featured image" button within the post editor.
  4. Try to delete a media from the window.
  5. Even after deleting the media file, it remains visible in the popup window.
  6. 🐞 Bug occurs.

Expected Results

  1. βœ… Delete the Media file permanently.

Actual Results

  1. ❌ I would like to say that I have seen these Media not getting removed from the media library popup after clicking the "Delete permanently" button since WordPress has grown with a few early releases.I could also reproduce the same issue with WordPress 6.3 Beta 3.

Video Link: ​https://www.loom.com/share/89321a9eb87d4627ab7a67bbfb54c9a8

Final outcome: ​https://imgtr.ee/image/hofUD

Last edited 5 months ago by ugyensupport (previous) (diff)

@Hareesh Pillai
5 months ago

While I could replicate the said issue, I also noticed the text "Showing 2 of 1 media items" in the popup below the images list.

#3 @Hareesh Pillai
5 months ago

  • Milestone changed from 6.3 to 6.4

I'm afraid it is too late to add new tickets to the 6.3 milestone as we are in the Beta phase.

@mukesh27 Feel free to add it back if you think this should be in the milestone. :)

This ticket was mentioned in ​PR #4837 on ​WordPress/wordpress-develop by ​@wpsharif.


5 months ago
#4

  • Keywords has-patch added; needs-patch removed

…icking "Delete permanently" button

Fix: media not getting removed from the media library popup after clicking "Delete permanently" button
Trac ticket: https://core.trac.wordpress.org/ticket/58730

This ticket was mentioned in ​Slack in #accessibility by joedolson. ​View the logs.


5 months ago

#6 @joedolson
5 months ago

  • Focuses accessibility removed
  • Keywords reporter-feedback added

This needs to be tested in WP 6.2 and earlier; if it's a regression introduced in 6.3, then we can and should try to fix it in 6.3.

#7 @adhun
4 months ago

  • Keywords reporter-feedback removed

Hi @joedolsonbn,
i was able to reproduce this issue on 6.2.2 so this issue is there for a long time now.

#8 @ugyensupport
4 months ago

@joedolson As mentioned by @adhun Yes, can see in the current version and even in WordPress 6.3 RC 1. It's a well-known case which had been bothering me a lot. looking very forward to seeing a fix in near WordPress releases.

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


4 months ago

#10 @wpsharif
4 months ago

Need to test the PR

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


4 months ago

#12 @oglekler
3 months ago

  • Keywords needs-testing added

This ticket was mentioned in ​Slack in #core-test by oglekler. ​View the logs.


3 months ago

#14 @Boniu91
3 months ago

Test Report

Patch tested: ​https://github.com/WordPress/wordpress-develop/pull/4837

Environment

  • OS: Windows 10
  • Web Server: Apache
  • PHP: 8.1
  • WordPress: 6.3-beta4-56216-src
  • Browser: Chrome
  • Theme: Twenty Twenty-One

Actual Results

  • ❌ Issue is not resolved with patch.

Steps made

  • Navigated to the page
  • Clicked on the "Set featured image" button within the post editor.
  • Tried removing a media from the window.
  • After deleting the file it disappeared
  • 'Showing 2 of 1 media items' is displayed 🐞
  • When going to 'Upload Files' and coming back, the image reappears 🐞

Supplemental Artifacts

​https://screenrec.com/share/PkH2Zj04XT

Last edited 3 months ago by Boniu91 (previous) (diff)

#15 @Ankit K Gupta
3 months ago

Test Report. ❌

Patch tested: ​https://github.com/WordPress/wordpress-develop/pull/4837

Env

  • WordPress - 6.4-alpha-20230824.164623
  • Web Server: Nginx
  • Chrome Version - 115
  • OS - macOS
  • Theme: Twenty Sixteen Version: 3.0
  • PHP - 7.4.0
  • Active Plugin - None

Steps to Test

Same as mentioned in the issue description.

Test result

  1. Media gets deleted after applying this patch, but it reappears when the user switches tabs between "Upload Files" and "Media Library."
  1. The term that displays current Media information, such as "Showing 4 of 1 media items," is not indicating the correct count.

Please refer attached video link to see the step-by-step actions:

​https://somup.com/c0jZqCATjv

Status

Patch needs refresh

This ticket was mentioned in ​Slack in #core-test by ankit-k-gupta. ​View the logs.


3 months ago

#17 @Ankit K Gupta
3 months ago

  • Keywords needs-patch added; has-patch removed

#18 @Ankit K Gupta
3 months ago

  • Keywords needs-refresh added

This ticket was mentioned in ​Slack in #core by zunaid321. ​View the logs.


3 months ago

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


3 months ago

#21 @oglekler
3 months ago

  • Keywords has-patch changes-requested has-screenshots added; needs-testing needs-patch needs-refresh removed

It looks like the patch needs a bit more work, I am adjusting keywords to indicate this.

#22 @nicolefurlan
2 months ago

@wpsharif are you able to update this patch? Release candidate 1 for 6.4 is in ~2 weeks, so I'm checking in on some in progress tickets.

#23 @wpsharif
2 months ago

@nicolefurlan I'm facing issue with 'npm install' on my machine. I just fixed it without test. I need help to move further.

#24 @ugyensupport
2 months ago

@wpsharif Looking very forward

Last edited 2 months ago by ugyensupport (previous) (diff)

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


2 months ago

#26 @antpb
2 months ago

  • Milestone changed from 6.4 to 6.5

With RC1 for 6.4 fast approaching this needs to move forward another milestone. Marking 6.5

Note: See TracTickets for help on using tickets.