Closed (duplicate)
Project:
Metatag
Version:
7.x-1.x-dev
Component:
Panels integration
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 May 2013 at 20:47 UTC
Updated:
29 Jun 2014 at 01:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damienmckennaPlease explain what you are configuring - are you configuring meta tags via the Panels interface and then hoping that the per-node values will override them when displayed using a Panels node_view page?
Comment #2
FAAREIA commentedHi Damien, i'm not using panel config. I'm just using per-node config and it does not override global config.
Every node comes from Pager Manager -> Panel variant with views
I'm using Drupal 7.22
Thanks for your help.
Comment #3
lowfour commentedI am having also a lot of troubles displaying per page metatags on nodes that use panel variants. I get the [node:summary] printed out correctly (well, it actually just prints the whole body) but as soon as I write some personalized meta description I get no effect. I just cannot seem to be able to print them out.
I enabled the submodule metatags panels and what I got then was a very nasty error in all pages where their variants had the metatags options activated. I have seen a patch somewhere else.
The whole procedure feels unfinished and unstable. Did someone find a workaround?
Comment #4
thelmer commentedHi Damien
I had the same problem on multilanguage sites.
The function metatag_ctools_render_alter calls metatag_entity_view witch langcode = NULL.
The language is not set later in the process and metatags for translated pages are not found.
I have attached a patch.
Comment #5
damienmckennaPlease test this patch with entities other than nodes - terms, users, etc. A better option might be to use metatag_entity_get_language().
Comment #6
thelmer commentedI have now tested with terms and it works fine, but metatags can't be defined for translations if the taxonomy translation are set to "Localize" ( Terms are common for all languages, but only their name and description may be localized )
Tomorrow I'll test for user pages.
Comment #7
FAAREIA commentedI tested the patch and it works fine with nodes and taxonomy terms (Translate tested, not Localize).
I have 2 languages, meta tags 1.0-beta7 and drupal 7.17.
Nodes and terms and rendered via Ctools Page manager with variants, each one with different views.
Both custom per-node/term and global meta tags are working in every case.
Thanks for the patch.
Comment #8
lorique commentedI have a problem with this patch.
The problem is that we're looking at the global for "Content language" which will work if the language of the entity is the same as what content language is set to. But what if its not?
Example:
I have a bi-lingual site which has two similar languages used on it, and where the "default" language can be different than the language of the entity being viewed. I add meta config for the entity in language one, but user views it in language 2. The entity is still language 1, but the content language will be language 2. Now default meta tags are used.
I think there is a simple solution to this, which has been overlooked. Use $entity->language instead of the global. This will ensure that its always the entity deciding which language the meta tags are in.
Otherwise we can use this http://drupalcontrib.org/api/drupal/contributions!entity!entity.module/f... for doing it. Its possible this is a more robust solution.
Comment #9
louis_sabet commentedSeem to be having the same issue here with beta 6 and panels pages.
Defining a node summary for any given node (rendered through panels) seems to produce a meta description, but providing a direct override for the meta description in the node edit form's metadata section doesn't do anything.
The workaround for now is to provide a node summary, but it's not particularly elegant as we want to use that field for node teasers (and the requirements for length and copy style vary between meta description and node teaser).
FWIW, the content type has multi-language disabled, though we do have the locale module enabled, and both en and en_GB defined in the languages config (with en_GB being the default).
Comment #10
damienmckennaComment #11
damienmckennaComment #12
gilgabar commentedHere's an updated patch that implements the suggestion from #5.
Comment #13
cobenash#12 works for me
Comment #14
sylus commentedI haven't had this problem but am using Entity Translation. However when applying this patch my language no longer worked on the non default language.
Comment #15
4fs commented#12 works for great for me - I have been waiting a fair bit for this fix. THANK YOU.
Comment #16
zwoelfgrad commented#12 works. Thanks
Comment #17
damienmckennaThis was fixed by #2056739: Custom metatags are ignored when using entity translation.