The "Generate Metatag" button does not appear on node edit/create forms, even for users with UID 1 or proper permissions (administer metatag content). This affects the core functionality of the module.

The issue is caused by an incorrect import statement in metatag_ai.module:

Current (incorrect): use Drupal\node\NodeForm;
Should be: use Drupal\node\Form\NodeForm;

This is caused by this: https://www.drupal.org/node/3517871

This causes the $form_object instanceof NodeForm check in metatag_ai_form_alter() to always return FALSE, preventing the button from being added to node forms.

Will provide a MR

Issue fork metatag_ai-3542806

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

doxigo created an issue. See original summary.

prometsource’s picture

The module is not abandoned. Perhaps this can help, please let us know. youtube.com/watch?v=bIOII6vBmuc&feature=youtu.be

nx2611’s picture

Status: Active » Closed (won't fix)
doxigo’s picture

Thanks guys for the update, I watched the video, and followed the exact steps, it does not work on a standalone Drupal 11.2 and higher

I'll see if I can figure out the issue and provide a patch :)

doxigo’s picture

Title: The button does not appear at all on Drupal 11 » Generate Metatag button not displaying due to incorrect NodeForm namespace import
Priority: Critical » Major
Issue summary: View changes
Status: Closed (won't fix) » Needs review

doxigo’s picture

Updated the issue details and provided a MR for you to check with Drupal 11.2

doxigo’s picture

Issue summary: View changes
nx2611’s picture

Status: Needs review » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

  • nx2611 committed 94af36e4 on 1.0.x authored by doxigo
    Issue #3542806: Generate Metatag button not displaying due to incorrect...
doxigo’s picture

Thanks, It seems you forgot to add credit on this issue

Status: Fixed » Closed (fixed)

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