Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The above errors occur after trying to add a translation for a node.
Steps to recreate:
- Go to a node's Translate tab.
- In the Select translations for [title] fieldset, select a node using the autocomplete.
- Click the Update translations button.
- 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.
Comment | File | Size | Author |
---|---|---|---|
i18n.pages_.inc_.patch | 529 bytes | sviolich |
Comments
Comment #1
sviolich CreditAttribution: sviolich commentedI should add that these are E_NOTICE-level errors that D6 may not show by default (see Write E_ALL compliant code).
Comment #2
joseph.olstad