We use the view to emulate Drupal core's handling of taxonomy/term. When I put a custom title under Metatags > Page Title, Drupal still uses the taxonomy term name for its page title.
The description, keywords are working correctly and on node pages there is also no problem.
I am working with Drupal 7.23 and tried with metatag version 7.x-1.0-beta7, 7.x-1.0-dev and latest snapshot from the repository. My theme is ninesixty.
I also dived into the code, but couldn't find anything. Your advice is highly appreciated.
Don't know if it helps: on beta4 + patch 1845326-102 it worked ok, but that patch is already committed.
Comments
Comment #1
DamienMcKennaI've got a patch brewing that'll resolve problems loading terms, gimme a few days and this should work.
Comment #2
immoreel CreditAttribution: immoreel commentedAny updates on this issue?
Comment #3
corneboele CreditAttribution: corneboele commentedRegarding this issue; when I disabled the metatag_views module, it suddenly started to work again.
Comment #4
Jboo CreditAttribution: Jboo commentedHaving a similar issue. Overridden taxonomy terms using views won't display any custom entry to page title or description. Without the Metatag views module the views takes on the default global settings. Looking forward to getting this working. All other nodes and front page metatags work.
Comment #5
ficklecatAlso having issues with this, taxonomy pages not showing custom meta tags (title or description) just the default. Hope to see an update on this, I can't figure it out.
Comment #6
gdana CreditAttribution: gdana commentedHey,
This is a real problem, is there any version (either dev or one of the latest betas) where the page title works in taxonomy pages using views?
If not, is there any kind of workaround for now until there is a patch, some code that can be placed in the template.php file that will make these variables available for the theme's template files?
Thanks
Comment #7
rag_gupta CreditAttribution: rag_gupta commentedSubscribing..
Comment #8
flaviamarcus CreditAttribution: flaviamarcus commentedHello, it seems that i have the same problem. Did someone came up with a solution?
Thanks.
Comment #9
saorab CreditAttribution: saorab commentedHad the same issue. I disabled the metatag_views module, and added
print render($page['content']['metatags']);
to page.tpl.php and page--taxonomy.tpl.php
and it worked. !!!
Comment #10
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedAnybody got an idea where one would look in order to fix this? I am trying to use metatag on taxonomy-panel-pages and it's just not working for the title.
Comment #11
DamienMcKennaThere are several problems when using Views to control taxonomy term pages, none the least that Views *always* assigns something via drupal_set_title() for page displays. The problem might be solvable by adjusting the module weights, but I've not tested the theory. I'm also considering changing Metatag to use drupal_set_title instead of the current theme-driven structure, but I've not tested that.
I've also not tested the different options when using Panels, it's something I need to do but I've been focusing on Panelizer & related modules for the past while; I'm hoping in early May I'll be past most of that work and will be able to get back on Metatag.
Comment #12
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedI've tried playing with the weights, but that didn't get me anywhere. All I could achieve was to not have a title at all. ;)
Comment #13
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedIf I print out the input to mytheme_html_head_alter() I do see various metatag_* items like metatag_description, but _not_ metatag_title. Very strange.
Comment #14
DamienMcKennaComment #15
ron_s CreditAttribution: ron_s commentedJust wanted to add to the discussion in case anyone else is having this issue. We originally cloned the core "Taxonomy term" view so we could suppress display of several vocabularies using the "Has taxonomy term ID (with depth)" contextual filter.
By simply cloning the view, it caused Metatag Page Title overrides on taxonomy terms to stop functioning. The Page Title was always shown as the default generated via views. As soon as we deleted the cloned "Taxonomy term" view, the Page Title overrides started functioning correctly.
As a side note, when using the Page Title module with Metatag, the page titles are displayed correctly -- even when the "Taxonomy term" view has been cloned.
Comment #16
buddyfinton CreditAttribution: buddyfinton commentedAre there any other solutions or any patches for this issue? We are having the same issue and the solutions outlines here do not work for us.
Comment #17
berenddeboer CreditAttribution: berenddeboer commented@buddyfinton, I stumbled upon this issue searching for an answer to a similar problem I had. In the end there were two things wrong: site had the Page Title module and the Entity Path module enabled. After disabling both, as site wasn't using them, everything worked perfectly.
Comment #18
il.muraviov CreditAttribution: il.muraviov commentedI use Views to display taxonomy, but have the same problem with Metatag. Anyone know how to resolve the problem? As I understand the only way nowadays is to disable Views for taxonomy?
Comment #19
DamienMcKennaClosed a duplicate: #2532380: Wrong page title after editing content
Comment #20
DamienMcKennaTwo things to test - use drupal_set_title(), or use template_preprocess_html().
Comment #21
johnpicozzi@damienMcKenna - Could this be a problem in D8? I am having a very similar problem where we use a token replacement for the title {{ title }} and it gets replaced correctly on the Drupal Views Preview output. However, on the views page in the tag (browser tab) you see {{ title }} | Site name.
Comment #22
DamienMcKenna@johnpicozzi: I have zero clue about that, sorry.
Comment #23
johnpicozzi@DamienMcKenna - Looks like Metatag module is not replacing the {{ title }} in the html title tag with the correct value. We have tested D8 with and without Metatag. Without Metatag the title (contextual filter replacement) displays correctly, with Metatag it does not.
Should we open a new issue or convert this one to a D8 Issue? Also, any solutions on the horizon?
Comment #24
DamienMcKennaMetatag doesn't do Twig string replacement, it only uses regular tokens.
Comment #25
OMD CreditAttribution: OMD commentedAm I missing something or is there no way to get useful fields like "Content:Title" into the page title using the views meta tags settings?