[wp-trac] [WordPress Trac] #60577: Pattern overrides: Add id to the supported image's binding attributes

WordPress Trac noreply at wordpress.org
Wed Feb 21 10:09:18 UTC 2024


#60577: Pattern overrides: Add id to the supported image's binding attributes
------------------------------------------+---------------------
 Reporter:  kevin940726                   |       Owner:  (none)
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  6.5
Component:  Editor                        |     Version:  trunk
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch needs-testing-info  |     Focuses:
------------------------------------------+---------------------

Comment (by gziolo):

 Step-by-step reproduction instructions from
 https://github.com/WordPress/gutenberg/pull/59194:

 > There's one bug I've spotted so far, it happens when an image block is
 added to a pattern source but left empty. When a user overrides that
 image, the image has no id, so the 'upload' option is visible on the
 toolbar.
 >
 > 1. Create a new post and insert an image block and leave it empty (in
 the placeholder state)
 > 2. From the block settings menu for the image block, create a new
 pattern, making it synced.
 > 3. Choose the 'Edit original' button from the toolbar to edit the
 pattern
 > 4. Select the image block, and from the advanced inspector options,
 check the 'Allow instance overrides' option
 > 5. Save changes
 > 6. Click the back button to go back to the post you were initially
 editing
 > 7. Add an image to image block in the pattern (use a media library
 image, so upload a new one or choose an existing one).
 > 8. Save the post.
 > 9. Reload, select the image in the pattern
 >
 > Expected: because the image added in step 7 is from the media library,
 there's no upload button on the block toolbar.
 > Before patch: there is an 'upload' button on the block toolbar

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60577#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list