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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jyraya created an issue. See original summary.

jyraya’s picture

Status: Active » Needs review
jyraya’s picture

Here a new patch with code improvement suggested by my colleague @Voidtek

jyraya’s picture

DamienMcKenna’s picture

Version: 7.x-1.21 » 7.x-1.x-dev
Component: Code » Multilingual/intl

Ok, but is there any reason to not put them in a group? Out of interest, but what service are they for?

  • DamienMcKenna committed aeefd3d on 7.x-1.x authored by jyraya
    Issue #2882048 by jyraya: i18n integration shouldn't assume a tag has a...
DamienMcKenna’s picture

Status: Needs review » Fixed
Parent issue: » #2853846: Plan for Metatag 7.x-1.22 release

Thanks. Committed!

jyraya’s picture

In 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.

Status: Fixed » Closed (fixed)

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