Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default rendered content for Dynamic content block is [] - shortcode not selected.... #36

Open
bobbingwide opened this issue Jun 24, 2020 · 4 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jun 24, 2020

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

@bobbingwide bobbingwide added bug Something isn't working enhancement New feature or request labels Jun 24, 2020
@bobbingwide bobbingwide self-assigned this Jun 24, 2020
bobbingwide added a commit that referenced this issue Jul 31, 2020
…ssue #34 - improve advanced parameter override capability - for bw_pages
bobbingwide added a commit that referenced this issue Oct 26, 2020
…ssue #34 - improve advanced parameter override capability - for bw_pages
@bobbingwide
Copy link
Owner Author

I believe the oik-block/shortcode-block suffers from the same problem.

@bobbingwide
Copy link
Owner Author

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>&#91;</span>]' === $result ) {
		$result="<!-- No result for shortcode $shortcode -->";
		$result.= '<p>Select a Display type</p>';
	}

@bobbingwide
Copy link
Owner Author

I should either raise a separate issue for the oik/shortcode-block or repurpose this issue.

@bobbingwide
Copy link
Owner Author

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

  • either add support for None
  • or implement a default in the server side rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant