Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The current generate commands aren't working:
$ drupal --version
Drupal Console version 1.0.0-rc11
$ drupal generate:metatag:tag --module='metatag_app_links' --group='app_links' --base_class='MetaPropertyBase' -y --multiple=FALSE --secure=FALSE
[ERROR] Command "generate:metatag:tag", is not a valid command name.
Comment | File | Size | Author |
---|---|---|---|
#26 | metatag-update-drupal-console-commands-2841737-26.patch | 19.04 KB | hjuarez20 |
| |||
#24 | metatag-console_commands_not_working-2841737-23.patch | 1.26 KB | andyg5000 |
| |||
#19 | metatag-n2841737-19.patch | 4.74 KB | DamienMcKenna |
| |||
#11 | metatag-n2841737-11.patch | 3.12 KB | DamienMcKenna |
|
Comments
Comment #2
jmolivas CreditAttribution: jmolivas at weKnow Inc commented@DamienMcKenna can you try updating to latest DrupalConsole RC-14?
Comment #3
DamienMcKennaAh, right.
Comment #4
jmolivas CreditAttribution: jmolivas at weKnow Inc commentedThe `self-update` command only work for the Launcher aka global executable and it must be run outside of any drupal site.
In order to update per site installation you need to execute `composer update drupal/console --with-dependencies` within the drupal site.
Comment #5
DamienMcKennaOk, that did solve the problem, thanks.
We now have the problem that the string labels aren't loading - did the path for the translation files change?
I'm also renaming the commands to include the "plugin" keyword, e.g. generate:plugin:metatag:tag.
Comment #7
jmolivas CreditAttribution: jmolivas at weKnow Inc commented@DamienMcKenna looking at the translation issue, a patch will be coming soon.
Comment #8
DamienMcKenna@jmolivas: Thanks!
Comment #9
DamienMcKennaThe test failures are because of a problem with the testbot, not the module's codebase - the tests work fine locally.
Comment #10
DamienMcKennaComment #11
DamienMcKennaAnd so I uploaded the wrong patch in #5, reverted the changes locally, and have lost the changes I made. Doh.
This renames the commands.
Comment #12
DamienMcKennaI'm now getting the following error:
Comment #13
jmolivas CreditAttribution: jmolivas at weKnow Inc commented@DamienMcKenna Did you updated to 8.2.5 ?
This is a conflict between dependencies
A new DrupalConsole release is scheduled for early Monday.
Comment #14
DamienMcKennaI ran
composer update --with-dependencies
..Comment #15
DamienMcKennaPS.
Comment #16
DamienMcKennaAnd then..
So, still broken. Any thoughts? Is it a bug in Symfony?
Comment #17
jmolivas CreditAttribution: jmolivas at weKnow Inc commented@DamienMcKenn try updating also the Launcher to RC-15 by executing from outside of your drupal project root
Comment #18
DamienMcKennaAh! Yes, thanks, that fixed the generator's problem starting.
How should I restructure the console/translations/* files?
Comment #19
DamienMcKennaMinor tweaks to spacing, comments.
Comment #20
DamienMcKennaComment #22
DamienMcKennaI committed #19, putting this back to Needs Work as the string translations still need to be fixed.
Comment #23
jim22 CreditAttribution: jim22 commentedHi. I'm getting an error when using Drupal Console to generate custom metatags.
Thanks for any help.
Jim
Drupal Console 1.8.0
Drupal Core 8.5.6
MetaTag 8.x-1.6
Comment #24
andyg5000@jim22's issue was caused by the console command classes extending the Symfony Command class instead of the Console command.
Here's a patch to fix that issue.
I'm not sure what needs to be done with Translations regarding [https://www.drupal.org/project/metatag/issues/2841737#comment-11895806], but if I figure that out, I'll throw another patch up :)
Comment #25
andyg5000Comment #26
hjuarez20 CreditAttribution: hjuarez20 as a volunteer commentedHi, I have updated the commands using the latest version of Drupal Console (1.9.3)
Comment #27
DamienMcKennaHonestly I've just been copying & pasting the files, rather than using the generator X-)
Could someone please give harold20's patch a try, if it works I'm happy to commit it.
Comment #29
DamienMcKennaCommitted. Thanks.