The above errors occur after trying to add a translation for a node.

Steps to recreate:

  1. Go to a node's Translate tab.
  2. In the Select translations for [title] fieldset, select a node using the autocomplete.
  3. Click the Update translations button.
  4. The errors appear on the subsequent page.

The line in question is:
$nid = i18n_node_autocomplete2nid($title, "translations][node][$lang", array($node->type), array($lang));

However this is in a form validation function where $node has not been declared.

Changing $node->type to $form['node']['#type'] resolves the problem. Patch file attached.

CommentFileSizeAuthor
i18n.pages_.inc_.patch529 bytessviolich
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sviolich’s picture

I should add that these are E_NOTICE-level errors that D6 may not show by default (see Write E_ALL compliant code).

joseph.olstad’s picture

Issue summary: View changes
Status: Active » Closed (outdated)