bobbingwide / fizzie

Fizzie theme - a Full Site Editing theme using Gutenberg blocks
9 stars 1 forks source link

Update Fizzie to cater for changes in Gutenberg 10.9.0 #70

Closed bobbingwide closed 1 year ago

bobbingwide commented 3 years ago

In Gutenberg 10.9.0 the wp:query-loop has been deprecated in favour of wp:post-template Until the code is changed to use wp:post-template, when the deprecation logic actually kicks in, annoying deprecation messages are produced.

The solution is to

  1. Change all instances of wp:query-loop to wp:post-template
  2. In the .html block templates and template parts
  3. And the database
  4. Rerun the internationalization, if it still works
  5. Eliminate the query-loop override logic, which has already been commented out

See also https://github.com/bobbingwide/thisis/issues/33

bobbingwide commented 3 years ago

WIth Gutenberg 11.1.0 and WordPress 5.7.2 attempting to view https://blocks.wp.a2z/block/todo-list-tabor-todo-list gives a Fatal on the 404 page after the warning about core/query-loop being renamed.

[30-Jul-2021 15:33:03 UTC] PHP Warning:  Block core/query-loop has been renamed to Post Template. core/query-loop will be supported until WordPress version 5.9. in C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat\wordpress-5.8\index.php on line 123
[30-Jul-2021 15:33:03 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function render_block_core_post_template() in C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat\wordpress-5.8\index.php:125
Stack trace:
#0 C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat.php(132): gutenberg_render_legacy_query_loop_block(Array, '', Object(WP_Block))
#1 C:\apache\htdocs\wp-a2z\wp-includes\class-wp-block.php(221): {closure}(Array, '', Object(WP_Block))
#2 C:\apache\htdocs\wp-a2z\wp-includes\class-wp-block.php(211): WP_Block->render()
#3 C:\apache\htdocs\wp-a2z\wp-includes\class-wp-block.php(211): WP_Block->render()
#4 C:\apache\htdocs\wp-a2z\wp-includes\blocks.php(799): WP_Block->render()
#5 C:\apache\htdocs\wp-a2z\wp-includes\blocks.php(837): render_block(Array)
#6 C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\build\block-library\blocks\template-part.php(89): do_blocks('<!-- wp:group {...')
#7 C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat.php(132): gutenberg_render_block_core_template_part(Array, '', Object(WP_Block))
#8 C:\apache\htdocs\wp-a2z\wp-includes\class-wp-block.php(221): {closure}(Array, '', Object(WP_Block))
#9 C:\apache\htdocs\wp-a2z\wp-includes\blocks.php(799): WP_Block->render()
#10 C:\apache\htdocs\wp-a2z\wp-includes\blocks.php(837): render_block(Array)
#11 C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\full-site-editing\template-loader.php(178): do_blocks('<!-- wp:html --...')
#12 C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\template-canvas.php(12): gutenberg_get_the_template_html()
#13 C:\apache\htdocs\wp-a2z\wp-includes\template-loader.php(106): include('C:\\apache\\htdoc...')
#14 C:\apache\htdocs\wp-a2z\wp-blog-header.php(19): require_once('C:\\apache\\htdoc...')
#15 C:\apache\htdocs\wp-a2z\index.php(17): require('C:\\apache\\htdoc...')
#16 {main}
  thrown in C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat\wordpress-5.8\index.php on line 125
bobbingwide commented 3 years ago

Workaround

Update to WordPress 5.8. Stick with Gutenberg 11.1.0

This still produces the Warning message.

Warning: Block core/query-loop has been renamed to Post Template. core/query-loop will be supported until WordPress version 5.9. in C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat\wordpress-5.8\index.php on line 123

bobbingwide commented 1 year ago

delivered in v1.0.0