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

[generate:plugin:block] Default content broken #4217

Closed
siliconmeadow opened this issue Dec 24, 2019 · 1 comment
Closed

[generate:plugin:block] Default content broken #4217

siliconmeadow opened this issue Dec 24, 2019 · 1 comment

Comments

@siliconmeadow
Copy link
Contributor

siliconmeadow commented Dec 24, 2019

[generate:plugin:block] Default content broken

Problem/Motivation

While generating scaffolding for a block, the defaultConfiguration() fn doesn't wrap the user added string in single quotes. Also, the build() fn has a trypo - should be ['#content'], not ['#conten'].

The block class created is broken as a result..

How to reproduce

  1. drupal generate:plugin:block;
  2. Type the module name for which the block is to belong;
  3. Enter the block name;
  4. Enter the plugin label;
  5. Enter the plugin id;
  6. Enter the region (optional);
  7. Enter no when asked about a container;
  8. Choose to generate a form structure;
  9. Create a textarea field;
  10. Enter a label;
  11. Input machine name;
  12. Enter a description;
  13. Enter a default value;
  14. Enter a weight;
  15. Press enter to stop adding fields;
  16. Choose not to create a template;
  17. Choose to complete the operation.
  18. Attempt to add the block through the GUI.

image

image

  • Drupal version 8.8.1.
  • Console version 1.9.4.
  • Console Launcher version 1.9.4.

Solution

Fix to the twig template (#4218 ).

@LOBsTerr
Copy link
Member

THnak you for your contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants