Open bobbingwide opened 4 years ago
I believe the oik-block/shortcode-block
suffers from the same problem.
In oik-blocks the workaround was to check the result of the shortcode expansion
if it was []
then it replaces it with "Select a Display type". See shortcodes/oik-content.php
-
if ( '<span>[</span>]' === $result ) {
$result="<!-- No result for shortcode $shortcode -->";
$result.= '<p>Select a Display type</p>';
}
I should either raise a separate issue for the oik/shortcode-block
or repurpose this issue.
I should either raise a separate issue for the
oik/shortcode-block
or repurpose this issue.
At present, once the Select a Display type message is displayed, in order to choose the first item, another needs to be selected.
Therefore, before doing this the solution should
When the Dynamic content block is first displayed, very few of the attributes are set. The server side rendering is invoked but the shortcode attribute is not set. The result is '[]'.
How can this be improved? See #34