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 for the overview. Down in the lower, right-hand corner is a link "Join." When I click on it, I get the error:

The requested page "/l10nserver7/?q=group/node/7/subscribe&destination=translate/languages/es" could not be found.

This issue is on the same set up as reported at http://drupal.org/node/1826478, but I don't believe the two bugs are related.

Comments

SebCorbin’s picture

Can you post the versions of you modules? L10n_server and OG are the most important ones.

inkling’s picture

core: 7.16 (but had the same problem with 7.15)
l10n_server: 7.x-1.x-dev
og: 7.x-2.0-beta2
Entity API: 7.x-1.0-rc3
chaos tool suite: 7.x-1.2+6-dev
Plural formula configurator: 7.x-1.2
Translation template extractor 7.x-1.0

...and various other modules that I don't expect to be related.

Looking at og, I could try 7.x-2.x-dev

inkling’s picture

I just downloaded and installed og 7.x-2.x-dev, but that made no difference.

pablov2’s picture

Core: 7.17
Organic groups Organic groups (og) Module Enabled 7.x-2.0-beta2
Localization server Localization server (l10n_server) Module Enabled 7.x-1.x-dev

Same problem

steinmb’s picture

Priority: Normal » Critical

The problem is this code in hook_form().

<?php
  $body = $node->body[LANGUAGE_NONE][0];
  $form['body'] = array(
    '#type' => 'text_format',
    '#base_type' => 'textarea',
    '#title' => t('Welcome message'),
    '#description' => t('Welcome message to display on the group homepage.'),
    '#default_value' => isset($body['value']) ? $body['value'] : '',
    '#rows' => 5,
    '#format' => isset($body['format']) ? $body['format'] : NULL,
  );

First line fails, <?php $body = $node->body[LANGUAGE_NONE][0];
due to that the $node object does not contain the body and rying to save save the node description fails since the $body variable is empty. I'll have not looked into the code creating the content type (node bundle) but I'll guess it simply fail in creating the content type properly. Still it is a bit strange since the body field is created on default.

Escalate this issue to critical then I consider, not being able to join just that.

steinmb’s picture

#1826478: Undefined property: stdClass::$body sounds like part of the same issue.

SebCorbin’s picture

Status: Active » Needs work

Code from the D6 version is pretty ugly considering how fields are handled in D7. We need to move the l10n logic (i.e. $node->l10n_group_language property) to form alter instead of hook_form in l10n_groups.

SebCorbin’s picture

Assigned: Unassigned » SebCorbin
Status: Needs work » Needs review
StatusFileSize
new7.27 KB

Here's a patch:

  • Added body field to install
  • Added upgrade path with hook_update_7001()
  • Moved alteration to body field API in hook_form_alter

This patch is part of the #1day1patch initiative.

SebCorbin’s picture

StatusFileSize
new7.96 KB

I've given up on implementing hook_update_N(), anyway we don't have any release yet...

  • Implemented hook_update_last_removed().
  • Added a message on group creation
    drupal_set_message(t('Remember to configure plurals for the language you mean to create a group for.'), 'warning');
    because this is why you get a 404.
  • Tagged l10n_group node type as group

Will commit if testbot is ok with that

SebCorbin’s picture

Status: Needs review » Fixed
gábor hojtsy’s picture

Woot :) SebCorbin++ :)

inkling’s picture

What Gábor said: "Woot." :-)

I put this on hold long ago and it will take me some time to review this.

inkling’s picture

Well...I set up Spanish as before. Only now I'm not seeing a Join button. I'm still relatively new to Drupal so I I'm guessing I'm missing something.

  • core: 7.19
  • l10n_server: 7.x-1.x-dev (dated 2013-Feb-08, a day after the above patch)
  • og: 7.x-2.0
  • Entity API: 7.x-1.0
  • chaos tool suite: 7.x-1.2
  • Plural formula configurator: 7.x-1.2
SebCorbin’s picture

I just added OG UI as a dependency of l10n_groups to make sure subscribe links work

  • Create an instance on http://simplytest.me/project/l10n_server/7.x-1.x with OG as additional project
  • Log in
  • Go to modules and activate Localization groups, confirm
  • Configuration > Languages > Add spanish
  • Add content > Translation group (lang = spanish)
  • Configure permissions > add "access localization community" to anonymous and authenticated
  • Add user and log in with his credentials
  • Go to the group and join it

Permissions may be the thing you forgot, this should be documented

inkling’s picture

You're right. I was missing OG UI from l10n_groups. I was also missing permissions. The Join button appears, once I go to the Spanish group. :-)

However, pressing Join gives me a blank page at ?q=group/node/1/subscribe&destination=translate/languages/es. If this is a separate problem, I'll open a new issue. And if the solution is not immediately obvious to you, I'll try to dig and see what is causing the problem.

I am having problems trying to make an l10n server instance per the instructions in #14, in order to reduplicate the error there. The Quick navigation box says, "No languages with plural formulas defined or no projects scanned yet. Check the configuration of languages, list of connectors and projects." If I check projects, I get a message that no projects are defined yet. That doesn't come as a surprise because I didn't set it up. If I check strings, I get a message that there are no strings to translate. That's no surprise, because I didn't see any strings get downloaded when I picked Spanish. I think I would end up spending a lot of time setting things up in a sandbox that quickly goes away. The l10n server I set up on my localhost is more solid.

inkling’s picture

I'm still getting the problem with the White Screen of Death. Since this is fixed with the patch above, I opened a new issue, #1925032 Localization Server, Join Group sends me to the White Screen of Death.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Changed opinion of possible related bug.