The issue has been detected in the version 7.x-1.21 but the problematic code is still present in the dev version.
When Metatag is enabled with I18n, I got this message: Notice : Undefined index: group in metatag_views_i18n_object_info() (line 69 of /modules/contrib/metatag/metatag_views/metatag_views.i18n.inc ). when we have custom metatags (via code) that have no group defined.
I have checked elsewhere to see if metatags require the definition of a group and I saw that in the file metatag.i18n.inc, the code treats the group as optional (see in the hook "metatag_i18n_object_info()"). I noticed the same in metatag_token_info() (see the file metatag.token.inc).
So, that means the definition of a group for a metatag is optional and then, the "metatag_views_i18n_object_info()" hook in metatag_views.i18n.inc must take into account too.
By screening the rest of the code, I saw the same problem for metatag_context and metatag_panels.
I am working on a patch.
Comment | File | Size | Author |
---|---|---|---|
#5 | undefined_group_in_i18n-2882048-5.patch | 2.99 KB | jyraya |
#4 | undefined_group_in_i18n-2882048-4.patch | 3.07 KB | jyraya |
#2 | undefined_group_in_i18n-2882048-2.patch | 3.19 KB | jyraya |
Comments
Comment #2
jyraya CreditAttribution: jyraya as a volunteer commentedThe patch is ready for review
Comment #3
jyraya CreditAttribution: jyraya as a volunteer commentedComment #4
jyraya CreditAttribution: jyraya as a volunteer commentedHere a new patch with code improvement suggested by my colleague @Voidtek
Comment #5
jyraya CreditAttribution: jyraya as a volunteer commentedOk, last improvement :-)
Comment #6
DamienMcKennaOk, but is there any reason to not put them in a group? Out of interest, but what service are they for?
Comment #8
DamienMcKennaThanks. Committed!
Comment #9
jyraya CreditAttribution: jyraya as a volunteer commentedIn the case where we have detected the problem, we defined meta tags designed for several internal services. Defining a group for each of them would obliges us to have a group per meta tag that would be meaningless for users.
That's why we did not defined a group like the module let us do it... except these 3 sub-modules.
Thank you very much to have treat it our ticket.