The metatag edit tab is not shown on node add and edit pages, eventhough the particular node type is enabled in the metatag settings. Reinstalling the module didn't fix the issue.

Comments

damienmckenna’s picture

Category: Bug report » Support request

Well, first off you don't need to "enable" it through the admin/config/search/metatags pages, it's automatically show for all supported entities (nodes, terms, users) out of the box.

Does it show for user 1 on your site? If so, did you enable the "advanced permissions" option on the advanced settings page?

damienmckenna’s picture

Status: Active » Postponed (maintainer needs more info)

Out of interest, are you either using Panopoly, or some custom made node-edit pages built with Panels, Display Suite or something else?

damienmckenna’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
leonardder’s picture

Nope, the metatag tab doesn't show up on user edit forms, including user 1. Advanced permissions is disabled. I'm not using custom edit forms either.

damienmckenna’s picture

Ok, then it seems something is messing up your site. What modules are do you have enabled?

dave reid’s picture

And what admin theme are you using?

leonardder’s picture

I'm using a custom admin theme. I now discovered that the metatag tab shows up on one custom content type (blog), not on page and webform. So it doesn't seem to be on the theming end.

damienmckenna’s picture

Was that one content type disabled in the "Master control for all entities" section of the advanced settings page?

leonardder’s picture

No, all content types are enabled in that section.

Sleeepy’s picture

I am facing the same problem... Did you find a solution to this yet?

Anonymous’s picture

I have a similar problem too.

I have discovered yesterday that Metatag Tab do not show up on translated page I was working on. Pages use the defaut page type. Everything is fine for the page placed as frontpage: Metatag tab show up on both french and translated page in english. For other pages Metatag tab show up only on french page, not on translated page in english does not show up at all.

This is a weird issue as it works only for one page while not on others.

So to resume:

  • Website site is multilingual, French and English
  • French is the main language
  • Pages are of Default Page type
  • Metatag tab show up for french page
  • Metatag tab does not show up for english page but page place as frontpage
Anonymous’s picture

Putting another page as frontpage does not change anything.

Furthermore, I installed Display Suite few weeks ago for testing purpose while building the site but it is now disabled and removed.

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Active

Do you need further info ?

damienmckenna’s picture

@Domsware: Either time to replicate & fix it, or someone to debug the problem, identify the code causing the issue and provide a patch to fix it that doesn't cause other regressions.

vorapoap’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

I think I also have this problem with latest 8.x version..

vorapoap’s picture

The common thing we do have here is the bilingual web site set up.. could that be a cause?
I don't have any Panel, Ponopoly, Display Suite.. sort of that thing installed.

damienmckenna’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev

D8 is completely different to D7 in this regard. In D8 you have to specifically add the field to the entity bundle (e.g. content type) in order to see the fields on an edit form. In D7 there are settings that control which entity bundles they show on.

fab4real’s picture

Same problem here with Drupal 8.1.9 and Metatag 8.x-1.0-beta10+8-dev : metas tab are not showing up in node edit forms.

damienmckenna’s picture

@fab4real: Did you add the "metatag" field to the content types you want to them to show on?

chrisrockwell’s picture

I'm working on a site that, for now, must stay on metatag 7.x-1.4 and ran into this issue. Maybe it will help someone - this is what I did...

In hook_entity_info_alter:

  $entity_info['your_entity_type']['metatags'] = TRUE;
  array_walk($entity_info['your_entity_type']['bundles'], function (&$bundle) {
    $bundle['metatags'] = TRUE;
  });

In hook_form_alter:

  if (strpos($form_id, 'your-entity-type_edit_form') !== FALSE) {
    // This _should_not_ be necessary with up-to-date metatags
    // Either way, it's not going to hurt anything since metatag just overwrites it anyway.
    $form['#metatags'] = [];
  }

And the final piece for me which I had to track down to metatag_entity_has_metatags() - apparently you also have to create a configuration for it admin/config/search/metatags/config/add. It's fine if you just leave it as-is and save. Once I did this the metatags tab showed on the entity edit form.

damienmckenna’s picture

@chrisrockwell: I'd love to hear why your site "must" stay on v1.4? There have been a *wealth* of fixes since that release.

chrisrockwell’s picture

@DamienMcKenna short answer: All I know is they aren't going to do it now; I've offered my help to get it done. It's a site with > 89000 nodes with metatags on (> 180,000 nodes total)

I was brought on to build a module that could be contributed back. Then I had to integrate it with the existing site, which is using 7.x-1.4 so the code in my comment is in a custom module specifically for this site.

damienmckenna’s picture

Status: Active » Closed (cannot reproduce)

This problem should not exist in the current 7.x-1.x codebase, closing it.

If someone is still experiencing a problem with the module, please open a new issue and contact me directly so I can help track down the problem.