Login

Contact

You can leave a message using the contact form below.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Error in module i18n

Hide all descriptions
Error description: 

Error displayed when you use the module i18n

warning: Parameter 1 to theme_i18n_node_select_translation() expected to be a reference, value given in ../includes/theme.inc on line 656

The cause of the problem in using PHP version 5.3

The solution is simple, but still requires some adjustment package module i18n. To this end, separates the folder is located in the module imageapi and open the file in the editor i18n.pages.inc. We are looking for a line 265 where it should place the following code:

<?php

function theme_i18n_node_select_translation(&$elements) {
 
$output = '';
  if (isset(
$elements['nid'])) {
   
$rows = array();
    foreach (
element_children($elements['nid']) as $lang) {
     
$rows[] = array(
       
drupal_render($elements['language'][$lang]),
       
drupal_render($elements['node'][$lang]),
      );
    }
   
$output .= theme('table', array(), $rows);
   
$output .= drupal_render($elements);
  }
  return
$output;
}
?>

Now we replace this function with this code:

<?php
function theme_i18n_node_select_translation($elements) {
 
$output = '';
  if (isset(
$elements['nid'])) {
   
$rows = array();
    foreach (
element_children($elements['nid']) as $lang) {
     
$rows[] = array(
       
drupal_render($elements['language'][$lang]),
       
drupal_render($elements['node'][$lang]),
      );
    }
   
$output .= theme('table', array(), $rows);
   
$output .= drupal_render($elements);
  }
  return
$output;
}
?>