I've set up a localization server and on the home page clicked on "Add content". I selected "Translation group" to create a new translation. I use Spanish. This gives me a page /l10nserver7/?q=translate/languages/es, which shows the error:
Notice: Undefined property: stdClass::$body in l10n_groups_l10n_community_build_language_page() (line 505 of \l10nserver7\sites\all\modules\l10n_server\l10n_groups\l10n_groups.module).
Lines 504 and 505 of the module are:
if (isset($groups[$lang_code]) && node_access('view', $group_node = node_load($groups[$lang_code]))) {
$output = $group_node->body[LANGUAGE_NONE][0]['safe_value'];
$group_node gets set by node_load, and that takes me deep into core code, ultimately to the entity class function cacheGet (in entity.inc). It retrieves the object from entityCache. So what sets the entityCache? I don't know yet. Nor have I been successful yet in figuring out what sets ->body.
My guess is that the error turns up because the group doesn't have a body. If so, the solution may be similar to this: http://drupal.org/node/1183678. But then, maybe not. Why would the code reference $group_node->body if it had never been set?
l10n_groups_form(), which implements hook_form(), has the following line of code. I believe it causes a similar error under different circumstances:
$body = $node->body[LANGUAGE_NONE][0];
I've traced up through the call stack for the code that sets $node->body and I haven't found it. I'm starting to wonder if core code got changed and it affected this code.
Back at line 505, I changed the code to:
$output = '';
This appears to have no adverse side effects. However, I don't know what group information was supposed to be displayed there. It feels like a kludge.
Comments
Comment #0.0
inkling commentedAdded some HTML tags
Comment #0.1
inkling commentedAdd additional research and information
Comment #1
steinmb commentedSounds like the same issue as #1827374: Can't join group
Comment #2
SebCorbin commentedThe way fields are handled in D7, we need to refactor that. Work is discussed in #1827374: Can't join group
Comment #2.0
SebCorbin commentedAdded the bit about changing $output to '';.