In the "metatag_translate" function, it seems that you're using an incorrect translate function.

The "i18n_string" is defined in the Internationalization module, while the "i18n_string_translate" function that you try to use for translation is defined in the "String translation" module. So, if on the user's website enabled only the Internationalization without enabled the "String translation" module then it can lead to this fatal PHP error "Fatal error: Call to undefined function i18n_string_translate() in .../www/sites/all/modules/metatag/metatag.module on line 1761".

I propose to use the "i18n_string" function for translation if you check its existence before, not "i18n_string_translate" function.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alextataurov’s picture

nessunluogo’s picture

patch #1 prevents the error.
thank you for the fast solution!

okokokok’s picture

I've had this on several sites. This patch fixes it.

Please release a new "recommended" version of the module as many more sites are breaking without this patch.

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
558 bytes

This is the correct approach - check if 'i18n_string_translate' exists.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed, thanks for catching the mistake.

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Fixed » Closed (fixed)

Now that v7.x-1.0-beta7 is out, I'm closing this in the interest of keeping the issue queue clean.