Closed bobbingwide closed 1 year ago
Here's an example where I put shortcode blocks into columns, discovered the unwanted paragraphs then added the equivalent using custom HTML blocks.
Also there's a custom HTML block with hand crafted <br />
tags between A, B and C
Here are two screen captures attempting to debug the columns blocks problem. In the first capture wpautop() IS being run. In the second it's NOT. You can see one red block disappear, just above the "Blocks" widget title. The rest of the output seems reasonable to me given the HTML input.
delivered in v0.5.0
In the UK Community Slack #gutenberg channel Dan Atrill reported a problem with unwanted paragraphs. I thought I'd already resolved this problem as reported in #20.
wpautop()
processing fromtemplate-part.php
While investigating a problem with the site logo image size I noticed the unexpected paragraph problem reappear in my
page-footer
template part. There were empty paragraphs around generated shortcode content. For this particular problem I discovered a simple workaround. Change from using thewp:shortcode
block to the custom HTML block.wp:html
I achieved this without having to look deeply into the code. Instead I developed a custom template that displays the minimum output to debug the generated HTML.
This issue is to formally document the requirements for a custom template to help debug blocks in the front end.
Requirements
Proposed solution
Output Input Debugging
configured as below.[contents]
shortcode initially.Custom template definition
input-output.html is
contents-shortcode.html template part is
where
[contents]
is a shortcode from oik-block[guts]
is a shortcode from oik-blocks[bw_wpadmin]
is a shortcode from oikoik-css/css
block is from oik-css.All of which are needed on the site for which Fizzie is targetted.