It is essential that Meta tags works out-of-the-box with Drupal core.

The following scenarios do not currently work (20120801).

Scenario #1: Node page:

  • Drupal 7.15, Metatag (current -dev), Token 1.1, CTools 1.0.
  • Install the above from a custom installation profile.
  • Upon installation, create a new content type with all default settings.
  • Create a new node of this content type, manually fill in a description meta tag.
  • Load the node page - the overridden meta tag does not show.

Scenario #2: Front page:

  • Drupal 7.15, Metatag (current -dev), Token 1.1, CTools 1.0.
  • Install the above from a custom installation profile.
  • Upon installation, go to admin/config/search/metatags/config/global%3Afrontpage and hardcode a new description value.
  • Go to the homepage - the overridden meta tag does not show.

FYI the output was recently changed in #1363476: Panels integration - ensure meta tags work OOTB on entity pages to work off hook_entity_view rather than hook_field_attach_view_alter(). I personally believe this is the correct approach, but clearly something isn't quite right.

CommentFileSizeAuthor
#1 metatag-n1708718.patch1.73 KBDamienMcKenna
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Issue summary: View changes

Linked to #1284852.

DamienMcKenna’s picture

Issue summary: View changes

Separated out the issue into two scenarios.

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
1.73 KB

This appears to resolve scenario #1.

DamienMcKenna’s picture

Status: Needs review » Needs work

Thinking on it further, it feels like the caching engine used on hook_page_build() doesn't seem to work, which is why the front page meta tag isn't working.

DamienMcKenna’s picture

Status: Needs work » Fixed

I committed the patch above, it does at least guarantee that meta tags are output on entity object pages that have hook_entity_view() support.

I re-ran the same tests on a clean install of D7, CTools 1.0, Token 1.1 and the current Metatag codebase and the homepage tags work.

Lets continue this in other issues as needed.

plopesc’s picture

Status: Fixed » Needs work

Hello

Metatag module dev release downloaded last week worked well for me. However, after upgrading to 7.x-1.0-beta7 title tag does not work for custom node pages.

I've done git checkout 37e1bd2 and it works fine for me now again. Some of the changes included last weekend broke the title tag behavior.

Regards

rbrownell’s picture

I can confirm that this is working for non-customized node pages. It however is not working for pages that are customized using panels. Customized nodes that use panels resort to the Global Default settings. (At least for Open Graph meta tags.) Should this be posted as a separate issue or is there already an issue for this?

DamienMcKenna’s picture

@nfd: Please follow #1363476: Panels integration - ensure meta tags work OOTB on entity pages for details of the Panels integration. Thanks.

DamienMcKenna’s picture

User entities work.

Test scenario for user defaults:

  • Override the User default settings (admin/config/search/metatags/config/user).
  • Manually assigned a custom description ("This is a user on our site.") and a custom title ("[user:name] | Users | [site:name]").
  • Verified that these work on user pages (no extras, just core user_view).

Test scenario for user object overrides:

  • Edit a user (user/1/edit).
  • Manually assigned a custom description ("Hi mom.") and a custom title ("This is my page | [site:name]").
  • Verified that these values appear on the user page (no extras, just core user_view).
DamienMcKenna’s picture

Term pages via taxonomy_term_page()... they really need #1067120: Missing hook_taxonomy_term_view() or hook_entity_view() when viewing a term (patch from comment #73 was used for these tests)!

Test scenario for term defaults without the patch:

  • Override the Taxonomy Term default settings (admin/config/search/metatags/config/taxonomy_term).
  • Manually assigned a custom description ("Term description: [term:description]") and a custom title ("[term:name] | Term | [site:name]").
  • Verified that these changes did not work on term pages, it continued to load the global default values.

Test scenario for term defaults with the patch:

  • Override the Taxonomy Term default settings (admin/config/search/metatags/config/taxonomy_term).
  • Manually assigned a custom description ("Term description: [term:description]") and a custom title ("[term:name] | Term | [site:name]").
  • Verified that these changes did work on term pages.

Test scenario for term overrides with the patch:

  • Edit a term (taxonomy/term/1/edit).
  • Manually assigned a custom description ("Hopefully this will work.") and a custom title ("Hello world | [site:name]").
  • Verified that these values appear on the term page.
standingtall’s picture

Thanks everyone .. Really desperate to see this working.

pyxio’s picture

I am having serious issues with metatags as well. For me, only global settings seem to work. I can't get overrides or page specific meta tags to work. Has this patch been incorporated into the dev version yet? I tried the dev version and seem to have the same problems. Cheers, Kevin

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Needs work » Active
DamienMcKenna’s picture

Category: bug » task
remkovdz’s picture

I've read somewhere else that the frontpage-problem should be fixed, but I just installed beta7 and it still doesn't work (no meta tags showing up on frontpage). Is this still a known issue or should it indeed be fixed?

DamienMcKenna’s picture

@remkovdz: Please take a look at the README.txt file included with the module and try some of the troubleshooting tips.

DamienMcKenna’s picture

Status: Active » Fixed

Am marking this resolved as all core entities work correctly out of the box as of beta5 (really much earlier, but there were bugs in beta4 that caused problems).

There are some one-off pages that may require further work, but at the very least Metatag:Context can be used as a work-around.

remkovdz’s picture

Thanks Damien, readme.txt was helpfull.

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

Anonymous’s picture

Issue summary: View changes

Corrected the link to the other issue, it was really #1363476.

DamienMcKenna’s picture

Assigned: DamienMcKenna » Unassigned
Issue summary: View changes