[wp-trac] [WordPress Trac] #64344: gutenberg_block_core_image_render_lightbox undefined $img_srcset
WordPress Trac
noreply at wordpress.org
Wed Dec 3 19:44:44 UTC 2025
#64344: gutenberg_block_core_image_render_lightbox undefined $img_srcset
-------------------------------+-----------------------------
Reporter: donbowman | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Interactivity API | Version: 6.9
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
in wordpress 6.9, gutenberg_block_core_image_render_lightbox(), line 224
(setting wp_interactivity_state), I am getting "Undefined variable
$img_srcset in /app/wp-content/plugins/build/scripts/block-
library/image.php on line 224"
In turn this is "'lightboxSrcset' => $img_srcset," in setting the
$unique_image_id array.
img_srcset is not set to a default in the function, and i think this
therefore implies that the speciic page has the $block['attrs']['id'] not
set, so it doesn't add the value.
i am not sure if it should bail out, or, if there is a default that would
make sense.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64344>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list