Closed (fixed)
Project:
Internationalization
Version:
7.x-1.4
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jan 2012 at 12:43 UTC
Updated:
6 Apr 2012 at 20:30 UTC
Random WSOD after updating to 1.3
Sometimes clearing caches helps, sometimes not.
Error log shows PHP Fatal error: Class name must be a valid object or a string in /PATH/TO/i18n_translation.module on line 249
Comments
Comment #1
rnyberg commentedI'm getting these as well, seems very random
Comment #2
webflo commentedPlease provide a list of you enabled i18n related modules.
Comment #3
mropanen commentedI have all but i18n_select and i18n_forum enabled.
I get this error mostly when trying to translate a node (e.g. node/add/article?translation=51917&target=fi). Sometimes hitting F5 helps, but most of the time it does not.
Comment #4
rnyberg commentedI was debugging and found that the $class variable is just NULL for some pages on our site. As a temporary fix, this _seems_ to make things work.
Comment #5
webflo commentedCan you post the backtrace?
Comment #6
rnyberg commentedCould you give me instructions how to do it and I will :)
Comment #7
webflo commentedPlease read Quick-and-Dirty Debugging for a first introduction.
Comment #8
rnyberg commentedField Translation module was the culprit. Disabling it solved the errors.
Comment #9
webflo commentedI set this back to needs work because its an error in field translation module.
Comment #10
mropanen commentedStill happens with Field translation disabled. Updated Drupal to 7.12 and i18n to 1.4
Backtrace from xdebug:
PHP Fatal error: Class name must be a valid object or a string in /var/www/html/site/sites/all/modules/i18n/i18n_translation/i18n_translation.module on line 249, referer: http://server/past-present/modern-china/olen-testi
PHP Stack trace:, referer: http://server/past-present/modern-china/olen-testi
PHP 1. {main}() /var/www/html/site/index.php:0, referer: http://server/past-present/modern-china/olen-testi
PHP 2. menu_execute_active_handler() /var/www/html/site/index.php:21, referer: http://server/past-present/modern-china/olen-testi
PHP 3. call_user_func_array() /var/www/html/site/includes/menu.inc:517, referer: http://server/past-present/modern-china/olen-testi
PHP 4. page_manager_term_view_page() /var/www/html/site/includes/menu.inc:0, referer: http://server/past-present/modern-china/olen-testi
PHP 5. ctools_context_handler_render() /var/www/html/site/sites/default/modules/ctools/page_manager/plugins/tasks/term_view.inc:124, referer: http://server/past-present/modern-china/olen-testi
PHP 6. ctools_context_handler_get_render_handler() /var/www/html/site/sites/default/modules/ctools/includes/context-task-handler.inc:42, referer: http://server/past-present/modern-china/olen-testi
PHP 7. ctools_context_handler_default_test() /var/www/html/site/sites/default/modules/ctools/includes/context-task-handler.inc:68, referer: http://server/past-present/modern-china/olen-testi
PHP 8. ctools_context_handler_get_handler_contexts() /var/www/html/site/sites/default/modules/ctools/includes/context-task-handler.inc:88, referer: http://server/past-present/modern-china/olen-testi
PHP 9. ctools_context_load_contexts() /var/www/html/site/sites/default/modules/ctools/includes/context-task-handler.inc:317, referer: http://server/past-present/modern-china/olen-testi
PHP 10. ctools_context_get_context_from_contexts() /var/www/html/site/sites/default/modules/ctools/includes/context.inc:1208, referer: http://server/past-present/modern-china/olen-testi
PHP 11. ctools_context_get_context_from_context() /var/www/html/site/sites/default/modules/ctools/includes/context.inc:1115, referer: http://server/past-present/modern-china/olen-testi
PHP 12. ctools_context_create_entity() /var/www/html/site/sites/default/modules/ctools/includes/context.inc:1081, referer: http://server/past-present/modern-china/olen-testi
PHP 13. entity_load() /var/www/html/site/sites/default/modules/ctools/plugins/contexts/entity.inc:86, referer: http://server/past-present/modern-china/olen-testi
PHP 14. DrupalDefaultEntityController->load() /var/www/html/site/includes/common.inc:7585, referer: http://server/past-present/modern-china/olen-testi
PHP 15. I18nTranslationSetController->attachLoad() /var/www/html/site/includes/entity.inc:204, referer: http://server/past-present/modern-china/olen-testi
PHP 16. i18n_translation_set_build() /var/www/html/site/sites/all/modules/i18n/i18n_translation/i18n_translation.module:28, referer: http://server/past-present/modern-china/olen-testi
Another one, this is from when I try to translate a node:
PHP Fatal error: Class name must be a valid object or a string in /var/www/html/site/sites/all/modules/i18n/i18n_translation/i18n_translation.module on line 249
PHP Stack trace:
PHP 1. {main}() /var/www/html/site/index.php:0
PHP 2. menu_execute_active_handler() /var/www/html/site/index.php:21
PHP 3. call_user_func_array() /var/www/html/site/includes/menu.inc:517
PHP 4. node_add() /var/www/html/site/includes/menu.inc:0
PHP 5. drupal_get_form() /var/www/html/site/modules/node/node.pages.inc:66
PHP 6. drupal_build_form() /var/www/html/site/includes/form.inc:123
PHP 7. drupal_retrieve_form() /var/www/html/site/includes/form.inc:331
PHP 8. call_user_func_array() /var/www/html/site/includes/form.inc:787
PHP 9. node_form() /var/www/html/site/includes/form.inc:0
PHP 10. node_object_prepare() /var/www/html/site/modules/node/node.pages.inc:93
PHP 11. module_invoke_all() /var/www/html/site/modules/node/node.module:961
PHP 12. call_user_func_array() /var/www/html/site/includes/module.inc:819
PHP 13. translation_node_prepare() /var/www/html/site/includes/module.inc:0
PHP 14. field_attach_prepare_translation() /var/www/html/site/modules/translation/translation.module:307
PHP 15. drupal_alter() /var/www/html/site/modules/field/field.attach.inc:1281
PHP 16. i18n_taxonomy_field_attach_prepare_translation_alter() /var/www/html/site/includes/module.inc:1018
PHP 17. i18n_taxonomy_field_prepare_translation() /var/www/html/site/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module:321
PHP 18. i18n_taxonomy_term_get_translation() /var/www/html/site/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module:334
PHP 19. i18n_translation_set_load() /var/www/html/site/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module:439
PHP 20. entity_load() /var/www/html/site/sites/all/modules/i18n/i18n_translation/i18n_translation.module:272
PHP 21. DrupalDefaultEntityController->load() /var/www/html/site/includes/common.inc:7585
PHP 22. I18nTranslationSetController->attachLoad() /var/www/html/site/includes/entity.inc:204
PHP 23. i18n_translation_set_build() /var/www/html/site/sites/all/modules/i18n/i18n_translation/i18n_translation.module:28
Comment #11
jose reyero commentedChanging to support request, setting priority, until we find out whether this is actually a bug in i18n.
Comment #12
mropanen commentedI noticed that when i18n_translation_set_info calls i18n_object_info, the $info = module_invoke_all('i18n_object_info') line returns an empty array. For some reason the hooks are not being called.
EDIT: Starting to look like a caching thing... maybe $info = &drupal_static(__FUNCTION__) does something unexpected?
Comment #13
miiimoooSorry for bumping this but has started happening here after a cache rebuild in various places
E.g. admin/structure/menu/manage/main-menu/translate
admin/structure/menu/manage/translation
Not quite sure where it may be coming from but it's running off empty caches so pretty sure it's not caching related.
Inserting a backtracer in i18n_translation_set_build I get this:
EDIT: shortened dump
Comment #14
miiimoooI think it's got to do with i18n_object_info not returning the object info for menus. I've inserted this into i18n.module, line 351:
and it gives an empty array though I found
function i18n_menu_i18n_object_info() {in i18n_menu/i18n_menu.i18n.inc
Comment #15
miiimoooI think this is a bug. I've inserted this:
cleared cache_boostrap.module_implements and the PHP fatal errors have disappeared. Commenting out the module_load_include and flushing the cache the fatal errors are back.
Comment #16
guillaumev commentedSame issue here...
Comment #17
miiimoooNow trying i18n_taxonomy and seems to get worse. Any ideas? I'm stuck but found this which seems related #1237266-1: Test with taxonomy translation + core menu + taxonomy menu.
Comment #18
miiimooo@guillaumev: the site you're experiencing this, was it upgraded from D6 or is it a fresh D7 site?
Comment #19
miiimoooI think it has to do with the order the modules get called. On another site where everything works i18n gets called before 18n_string though they are both weight=10. On the broken site i18n_string gets called before i18n. Changing the module weight of i18n_string to 15 fixes the problem and all others here:
Suggesting to change this in dev after review by module maintainer.
Comment #20
mgiffordThanks @miimooo - that fixed it for me. I was getting that nasty WSOD from en/admin/structure/menu/item/2494/edit
EDIT - Wait.. It comes back when I clear the cache, so that's not it....
Comment #21
miiimoooMay be unrelated, it's definitely fixed here. Have you followed http://drupal.org/node/158043 ?
Comment #22
mgiffordThanks for the WSOD reference. It's intermittent, but will definitely want to follow up on that if it persists.
Comment #23
jose reyero commenteda) No patch for 'needs review' so changing status.
b) Some hooks have been reworked in latest -dev, try that version.
c) Changing module weights is not a solution unless we identify what is failing here.
Comment #24
miiimoooThanks. I've checked the latest dev and works.
Comment #25
vacilando commentedI confirm that the problem of
PHP Fatal error: Call to a member function format_translation() on a non-objectdoes not exist any more in the latest dev.
Comment #26
nickgee commentedTrue, the DEV release doesn't bork.
Current translation sets seem to work too.
But all the sets are listed as undefined // unkown