I had a little look, but I didn't solve the problem, sorry :-(
Let me know if you need info to be able to re-produce the bug.

Cheers

Mark.

Comments

dman’s picture

Status: Active » Needs review

It's due to an over-eager iteration of the form elements. Quite ugly.
It'll pop up when your node type is a little bit complex, eg, it has a taxonomy selector or other goodness.

Patch this in over top of the old _i18n_auto_form_iterate_for_textareas() function

/**
 *  This will return all the (nested) textarea elements in a form.
 */
function _i18n_auto_form_iterate_for_textareas($form) {
  static $elements;

  if (!isset($elements)) {
    $elements = array();
  }
  foreach (element_children($form) as $element) {
    $item = $form[$element];
    if ($item['#type'] == 'textarea') {
      $elements[$element] = $item;
    }
    else if (is_array($item)) {
      _i18n_auto_form_iterate_for_textareas($item);
    }
  }
  return $elements;
}

It uses the proper foreach( element_children($form) rather than an enthusiastic foreach( $form

aaron’s picture

Assigned: Unassigned » aaron
Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

thanks, dman! i forgot to subscribe to this issue queue, then got sidetracked, and the module fell to the back burner. i would have finished it months ago if i'd seen your patch.

going to get back to making this module work.

aaron winborn

aaron’s picture

Status: Reviewed & tested by the community » Fixed

committed. thanks for the patch!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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