Opened 2 months ago
Closed 2 months ago
#64344 closed defect (bug) (worksforme)
gutenberg_block_core_image_render_lightbox undefined $img_srcset
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 6.9 |
| Component: | Interactivity API | Keywords: | |
| Focuses: | Cc: |
Description
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 $blockattrs?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.
Change History (2)
#2
@
2 months ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
Hi there,
Please note that issues with the Gutenberg plugin should be reported on GitHub.
Looks like this particular bug was already reported though and fixed in version 22.2 (released today), see https://github.com/WordPress/gutenberg/pull/73453
The block which causes this is below.
Array ( [blockName] => core/image [attrs] => Array ( [width] => 375px [sizeSlug] => large [linkDestination] => none [align] => right ) [innerBlocks] => Array ( ) [innerHTML] => <figure class="wp-block-image alignright size-large is-resized"><img src="https://www.agilicus.com/www/1e428847-image-965x1024.png" alt="" style="width:375px"/></figure> [innerContent] => Array ( [0] => <figure class="wp-block-image alignright size-large is-resized"><img src="https://www.agilicus.com/www/1e428847-image-965x1024.png" alt="" style="width:375px"/></figure> ) )