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.
I'm trying to create some custom metatags, and I'm using Drupal Console to generate the code. After doing so I go to my Add Content page and get:
Class 'Drupal\metatag\Plugin\metatag\Tag\TagBase' not found in /Users/spatz/mods/drupal8.dev/modules/contrib/metatag/src/Plugin/metatag/Tag/ParselyTest.php
Comment | File | Size | Author |
---|---|---|---|
#2 | metatag-n2664276-2.patch | 523 bytes | DamienMcKenna |
Comments
Comment #2
DamienMcKennaOops! The problem is that the default base class is incorrect, it should be "MetaNameBase". Try changing your plugin to inherit from that class and it should work.
This patch will fix the generator.
Comment #3
DamienMcKennaComment #4
StevenPatzThat works for me.
Comment #5
rajeev_drupal CreditAttribution: rajeev_drupal commentedComment #6
rajeev_drupal CreditAttribution: rajeev_drupal commentedTested. Looks fine.
Comment #7
DamienMcKennaThanks rajeev_drupal!
Comment #9
DamienMcKennaCommitted. Thanks for the reviews!