Make WordPress Core

Opened 12 months ago

Closed 6 months ago

#58973 closed defect (bug) (fixed)

Unwanted Section appears in the sidebar of Media Library after go back from Edit Image

Reported by: sruthi89's profile sruthi89 Owned by: joedolson's profile joedolson
Milestone: 6.5 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch has-testing-info commit
Focuses: Cc:

Description

Unwanted Section with 'Actions' and 'Select or Upload Media' texts appears in the sidebar of Media Library and nothing happens on selection or click of the texts.

To find the issue,please go through the below steps.

1.Select Media Library from the 'File' block and then select an image from the list.
2.Before click on the 'select' button , select 'Edit Image' and then go back to Media Library section such as previous section.
3.Sidebar section with the specified texts appears.

Attachments (6)

Screenshot 2023-08-03 at 9.20.39 PM.png (379.6 KB) - added by nithi22 12 months ago.
I could reproduce this issue
Screenshot 2023-08-03 at 9.21.30 PM.png (525.0 KB) - added by nithi22 12 months ago.
After edit image
Screencast from 11.08.2023 14:54:20.webm (430.4 KB) - added by ivanzhuck 12 months ago.
Screencast from 11.08.2023 14:54:59.webm (552.6 KB) - added by ivanzhuck 12 months ago.
58973.diff (778 bytes) - added by dhruvishah2203 12 months ago.
58973.followup.diff (939 bytes) - added by joedolson 6 months ago.
Follow up patch

Download all attachments as: .zip

Change History (28)

@nithi22
12 months ago

I could reproduce this issue

@nithi22
12 months ago

After edit image

#1 @swissspidy
12 months ago

  • Component changed from General to Media
  • Focuses performance removed
  • Keywords dev-feedback removed

#2 @sruthi89
12 months ago

  • Focuses performance added
  • Keywords dev-feedback added
  • Version set to trunk

#3 in reply to: ↑ description @sruthi89
12 months ago

Last edited 12 months ago by sruthi89 (previous) (diff)

#4 in reply to: ↑ description @sruthi89
12 months ago

Last edited 12 months ago by sruthi89 (previous) (diff)

#5 in reply to: ↑ description @sruthi89
12 months ago

Replying to sruthi89:

Unwanted Section with 'Actions' and 'Select or Upload Media' texts appears in the sidebar of Media Library and nothing happens on selection or click of the texts.

To find the issue,please go through the below steps.

1.Select Media Library from the 'File' block and then select an image from the list.
2.Before click on the 'select' button , select 'Edit Image' and then go back to Media Library section such as previous section.
3.Sidebar section with the specified texts appears.

Environment

WordPress: 6.3-RC3-56344
PHP: 7.4.33
Server: TasteWP-S4 Official/3.0.0
Database: mysqli (Server: 8.0.32-0ubuntu0.20.04.2 / Client: mysqlnd 7.4.33)
Browser: Firefox 116.0 (Windows 10/11)
Theme: Twenty Twenty-Three 1.2
MU-Plugins: None activated

Plugins:
WordPress Beta Tester 3.5.2

Steps to Reproduce
1.Select Media Library from the 'File' block or 'Image' block and then select an image from the list.
2.Before click on the 'select' button , select 'Edit Image' and then go back to Media Library section such as previous section.
3.Sidebar section with the specified texts appears.

Expected Results
There is no need of such sidebar section.

Actual Results
Sidebar section with just texts with no click action appears.

#6 @sruthi89
12 months ago

  • Focuses performance removed
  • Keywords dev-feedback removed

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


12 months ago

#8 @joemcgill
12 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version trunk deleted

I can reproduce this issue also with WP 6.2.2, so this seems to be an existing bug.

This ticket was mentioned in PR #4993 on WordPress/wordpress-develop by @ivanzhuck.


12 months ago
#9

  • Keywords has-patch added; needs-patch removed

Hi there!

I've added a small fix for the issue. Now, the Action menu shows only if it has more than one item, the same way like it happens here: wp.media.view.Menu.visibility

#10 @joedolson
10 months ago

  • Milestone changed from Future Release to 6.5
  • Owner set to joedolson
  • Status changed from new to accepted

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


6 months ago

#12 @joedolson
6 months ago

  • Keywords needs-testing has-testing-info added

Testing instructions

  1. Select Media Library from the 'File' block or 'Image' block and then select an image from the list.
  2. Select 'Edit Image'
  3. Without editing, use the 'back' button to return to the Media Library

Before patch
-Sidebar action panel with no actions.

After patch
-Sidebar action panel is not visible.

Last edited 6 months ago by joedolson (previous) (diff)

#13 @ukdrahul
6 months ago

Test Report

Environment

  • WordPress: 6.5-beta1
  • PHP: 8.1.23
  • Server: Apache v2.4.58
  • Database: MySQL 8.0.16
  • Browser: Chrome v121.0.6167.160 (Official Build) (arm64)
  • OS: macOS Sonoma v14.2.1 (23C71)
  • Theme: Twenty Twenty-Four v1.0

Verdict

The issue reported in this ticket still persists in this tested environment.

https://raw.githubusercontent.com/Ukdrahul/testing-img/main/test%20image.png

#14 @joedolson
6 months ago

@ukdrahul The patch seems to work as expected for me; in case our testing process wasn't the same, I did update the testing instructions to be more clear, above.

I tested on Windows with Chrome & Firefox, but I don't really think it's very likely that this fix is OS dependent. Can you re-test the patch?

#15 @shailu25
6 months ago

Test Report

Tested Patch: https://core.trac.wordpress.org/attachment/ticket/58973/58973.diff

Testing Environment:

OS: Windows
Web Server: Nginx
PHP: 8.1.23
WordPress: 6.5-beta1
Browser: Chrome
Theme: Twenty Seventeen
Active Plugins: None

Actual Results:

  • Sidebar action panel is not visible With Patch.✅

Screenshots:

Before Patch: https://prnt.sc/tz16mo2ynk61
After Patch: https://prnt.sc/AhFx61E53jiy

#16 @joedolson
6 months ago

  • Keywords commit added; needs-testing removed

#17 @joedolson
6 months ago

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

In 57688:

Media: Prevent Media Library sidebar from showing with no actions.

Fix an issue where the actions sidebar in the media library could appear when there are no relevant actions available.

Props sruthi89, nithi22, ivanzhuck, dhruvishah2203, joemcgill, ukdrahul, joedolson, shailu25.
Fixes #58973.

#19 @joedolson
6 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This introduced an error in the media grid view; reopening to fix.

@joedolson
6 months ago

Follow up patch

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


6 months ago

#21 @antpb
6 months ago

@joedolson fix looks good in my testing! thank you!

#22 @joedolson
6 months ago

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

In 57691:

Media: Fix broken media modal following [57688]

Fix undefined TypeError overlooked in [57688].

Props antpb, swissspidy, joedolson.
Fixes #58973.

Note: See TracTickets for help on using tickets.