Restrict featured image selection to single image#77213
Restrict featured image selection to single image#77213adamsilverstein wants to merge 1 commit intotrunkfrom
Conversation
The MediaUpload component for the featured image panel did not
explicitly set multiple={false}, allowing users to select multiple
images in the media library modal. Since a post can only have one
featured image, enforce single selection.
Props WordPress/wordpress-develop#8294.
See https://core.trac.wordpress.org/ticket/65053.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +2 B (0%) Total Size: 7.74 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in f603d85. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24220299664
|
|
I tested this manually and verified it fixes the issue reported in https://core.trac.wordpress.org/ticket/65053 |
|
Unfortunately, the issue has not been resolved in my environment. Furthermore, it appears this problem is occurring elsewhere, such as with image blocks 🤔 e8a5098fe39fee4e64b81b409e3808d7.mp4 |
Summary
multiple={ false }to theMediaUploadcomponent in the featured image panelContext
The
MediaUploadcomponent for the "Set featured image" button did not explicitly disable multiple selection. While theonDropFileshandler already hadmultiple: false, the media library modal itself allowed multi-select, which is confusing since only the first selected image would be used.Trac ticket: https://core.trac.wordpress.org/ticket/65053
Test plan