drupal-console icon indicating copy to clipboard operation
drupal-console copied to clipboard

[generate:plugin:ckeditorbutton] Spelling error of variable in plugin.php.twig

Open ooneill547 opened this issue 4 years ago • 2 comments

Problem/Motivation

I was unable to generate the module files to install a CKEditor plugin in Drupal 8 due to a misspelled variable in 'console/templates/module/src/Plugin/CKEditorPlugin/plugin.php.twig'.

How to reproduce

  • Drupal version: 8.7.9
  • Console version: 1.9.4
  • Console Launcher version: 1.9.4

Steps to reproduce

  • Run drupal generate:plugin:ckeditorbutton
  • Follow instructions to enter appropriate values when requested.
  • Choose yes to proceed with the operation when prompted.

An error, 'variable "pligins_id" does not exist' appears: image

Solution

Edit the variable in line 8 of the file 'console/templates/module/src/Plugin/CKEditorPlugin/plugin.php.twig' from CKEDITOR.plugins.add('{{ pligins_id }}', { to CKEDITOR.plugins.add('{{ plugin_id }}', { as seen in #4202

Rerun drupal generate:plugin:ckeditorbutton and the generator should complete successfully.

ooneill547 avatar Nov 22 '19 13:11 ooneill547

Thank you @ooneill547 I had the same issue. Fixing the typo resolved it.

Drupal Console version 1.9.7 Drupal version 8.9.13

ronaldmulero avatar Feb 18 '21 23:02 ronaldmulero

thanks for reporting, as it still needs manual fix.

Drupal Console version 1.9.7 Drupal version 8.9.17

vrwired avatar Jul 27 '21 23:07 vrwired

It was fixed here https://github.com/hechoendrupal/drupal-console/pull/4339

Thank you for your contribution

LOBsTerr avatar Sep 16 '22 15:09 LOBsTerr