[wp-trac] [WordPress Trac] #60928: Interactivity API: Fatal error with empty image

WordPress Trac noreply at wordpress.org
Tue Jun 11 22:42:42 UTC 2024


#60928: Interactivity API: Fatal error with empty image
-------------------------------------+----------------------
 Reporter:  donohoe                  |       Owner:  (none)
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:
Component:  Editor                   |     Version:  6.5.4
 Severity:  normal                   |  Resolution:  invalid
 Keywords:  reporter-feedback close  |     Focuses:
-------------------------------------+----------------------
Changes (by fnorte):

 * version:  6.5 => 6.5.4


Comment:

 Thsi closed issue happening with me too, after upgrade from 6.4.3 to
 6.5.4, but in all post with the image block on content. like this...

 {{{
 <!-- wp:image {"id":226159,"sizeSlug":"full","linkDestination":"none"} -->
 <figure class="wp-block-image size-full"><img src="https://noataque.local
 /wp-content/uploads/2024/06/53782904335_2d2f19b211_c.jpg" alt="Gustavo
 Scarpa deve atuar novamente pelo lado esquerdo no Atlético" class="wp-
 image-226159"/><figcaption class="wp-element-caption">Gustavo Scarpa deve
 atuar novamente pelo lado esquerdo no Atlético</figcaption></figure>
 <!-- /wp:image -->
 }}}

 I made some tests removing the block and work withouth problemas.
 I got back to old version (6.4.3) and works withouth problem.

 I trying to figured out how to identify what is causing that in my own
 theme code.

 {{{
 [11-Jun-2024 22:39:52 UTC] PHP Fatal error:  Uncaught TypeError:
 {closure}(): Argument #1 ($content) must be of type string, null given,
 called in /var/www/noataque/public_html/wp-includes/class-wp-hook.php on
 line 326 and defined in /var/www/noataque/public_html/wp-includes
 /interactivity-api/interactivity-api.php:46
 Stack trace:
 #0 /var/www/noataque/public_html/wp-includes/class-wp-hook.php(326):
 {closure}()
 #1 /var/www/noataque/public_html/wp-includes/plugin.php(205):
 WP_Hook->apply_filters()
 #2 /var/www/noataque/public_html/wp-includes/class-wp-block.php(525):
 apply_filters()
 #3 /var/www/noataque/public_html/wp-includes/blocks.php(1705):
 WP_Block->render()
 #4 /var/www/noataque/public_html/wp-includes/blocks.php(1743):
 render_block()
 #5 /var/www/noataque/public_html/wp-includes/class-wp-hook.php(324):
 do_blocks()
 #6 /var/www/noataque/public_html/wp-includes/plugin.php(205):
 WP_Hook->apply_filters()
 #7 /var/www/noataque/public_html/wp-includes/rest-api/endpoints/class-wp-
 rest-posts-controller.php(1865): apply_filters()
 #8 /var/www/noataque/public_html/wp-includes/rest-api/endpoints/class-wp-
 rest-posts-controller.php(569):
 WP_REST_Posts_Controller->prepare_item_for_response()
 #9 /var/www/noataque/public_html/wp-includes/rest-api/class-wp-rest-
 server.php(1230): WP_REST_Posts_Controller->get_item()
 #10 /var/www/noataque/public_html/wp-includes/rest-api/class-wp-rest-
 server.php(1063): WP_REST_Server->respond_to_request()
 #11 /var/www/noataque/public_html/wp-includes/rest-api.php(555):
 WP_REST_Server->dispatch()
 #12 /var/www/noataque/public_html/wp-includes/rest-api.php(2922):
 rest_do_request()
 #13 [internal function]: rest_preload_api_request()
 #14 /var/www/noataque/public_html/wp-includes/block-editor.php(753):
 array_reduce()
 #15 /var/www/noataque/public_html/wp-admin/edit-form-blocks.php(77):
 block_editor_rest_api_preload()
 #16 /var/www/noataque/public_html/wp-admin/post.php(187): require('...')
 #17 {main}
   thrown in /var/www/noataque/public_html/wp-includes/interactivity-api
 /interactivity-api.php on line 46

 }}}

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


More information about the wp-trac mailing list