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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

StevenPatz created an issue. See original summary.

DamienMcKenna’s picture

Title: Class Not Found Error » Default base class "TagBase" is incorrect for generated tags
FileSize
523 bytes

Oops! 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.

DamienMcKenna’s picture

Status: Active » Needs review
Parent issue: » #2655294: Plan for Metatag 8.x-1.0-beta5 release
StevenPatz’s picture

That works for me.

rajeev_drupal’s picture

Assigned: Unassigned » rajeev_drupal
rajeev_drupal’s picture

Tested. Looks fine.

DamienMcKenna’s picture

Assigned: rajeev_drupal » Unassigned
Status: Needs review » Reviewed & tested by the community

Thanks rajeev_drupal!

  • DamienMcKenna committed bbd2325 on 8.x-1.x
    Issue #2664276 by DamienMcKenna, StevenPatz, rajeev_drupal: Wrong...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks for the reviews!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.