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.
Comment | File | Size | Author |
---|---|---|---|
#4 | metatag-n1971406-4.patch | 558 bytes | DamienMcKenna |
#1 | incorrect_calling_i18n_string_translate-1971406-2.patch | 435 bytes | alextataurov |
Comments
Comment #1
alextataurov CreditAttribution: alextataurov commentedComment #2
nessunluogo CreditAttribution: nessunluogo commentedpatch #1 prevents the error.
thank you for the fast solution!
Comment #3
okokokok CreditAttribution: okokokok commentedI'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.
Comment #4
DamienMcKennaThis is the correct approach - check if 'i18n_string_translate' exists.
Comment #5
DamienMcKennaCommitted, thanks for catching the mistake.
Comment #6
DamienMcKennaClosed a duplicate: #1972094: Undocumented dependency causes 500 error
Comment #7
DamienMcKennaNow that v7.x-1.0-beta7 is out, I'm closing this in the interest of keeping the issue queue clean.