Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I can see my og: tags on the front page, but my views don't inherit from the global settings ... no tags are displayed.
Comment | File | Size | Author |
---|---|---|---|
#12 | metatag-n1861656-12.patch | 2.39 KB | DamienMcKenna |
#10 | metatag-n1861656-10.patch | 318 bytes | DamienMcKenna |
#7 | metatag-n1861656-7.patch | 1.38 KB | DamienMcKenna |
Comments
Comment #1
Dave ReidWhat are you using to display meta tags with your Views?
Comment #2
aidanlis CreditAttribution: aidanlis commentedWhat do you mean? I want metatags to use the global settings ...
Comment #3
DamienMcKenna@aidanlis: Do you mean that you're expecting the global meta tags to display on Views pages? Are they custom Views pages or are they entity pages being displayed using Views, e.g. taxonomy term pages?
Comment #4
aidanlis CreditAttribution: aidanlis commentedThey are custom views pages, and yes it'd be great if the defaults carried through. I see there's work going on in #1804356: Views integration: option to add meta tags within the Views UI which would make this request redundant, so happy for you to mark as duplicate if that's the way forward.
Comment #5
torrance123 CreditAttribution: torrance123 commentedThat was my expectation too — I expected the global defaults to work on all pages unless a more specific metatag configuration existed (eg. for node pages, user pages, etc.).
Are there any foreseeable issues with switching to this behaviour?
Comment #6
torrance123 CreditAttribution: torrance123 commentedThis is one possible method to ensure all pages have, at a minimum, the global metatags set:
Edit: Fixed the patch snippet
Comment #7
DamienMcKennaThis version is a little cleaner - it only loads the meta tags if nothing was found already. I've tested it with metatag_context and the context-provided tags still load correctly, so I think it'll be fine.
Comment #8
torrance123 CreditAttribution: torrance123 commentedGreat, I've patched our version of Metatags with the patch in comment 7, and all works as expected for us.
Comment #9
DamienMcKennaUpdating the title to better describe the change being made.
Comment #10
DamienMcKennaBecause this is potentially a performance drain on pages that may not need it, I've added a variable to control it and documented the new variable in the Fine Tuning section of the README.txt file.
Comment #11
DamienMcKennaARGH. I didn't output the results of "git diff", I output the results of "git status", and I've since reverted the changes.
Comment #12
DamienMcKennaRe-recreated the functionality and update to the README.txt file. Also, argh.
Comment #13
DamienMcKennaComment #14
DamienMcKennaCommitted.
Comment #15
DamienMcKennaNow that Metatag v7.x-1.0-beta5 is out am closing this to keep the issue queue clean.