When clicking link "Content Types" in admin a warning is displayed in the message area above listing of content types:
warning: Invalid argument supplied for foreach() in /var/www/drupal5/sites/all/modules/i18n/experimental/i18nsync.module on line 47.
the afflicting code is:
// Each set provides title and options. We build a big checkboxes control for it to be
// saved as an array. Special themeing for group titles.
foreach (i18nsync_node_available_fields($type) as $group => $data) {
$title = $data['#title'];
-->> foreach ($data['#options'] as $field => $name) {
$form['workflow']['i18n']['i18nsync_nodeapi'][$field] = array(
'#group_title' => $title,
'#title' => $name,
'#type' => 'checkbox',
'#default_value' => in_array($field, $current),
'#theme' => 'i18nsync_workflow_checkbox',
);
$title = '';
}
}
I don't know if it has anything to do with it, but so far I have not done any translations. I have only enabled a 2nd language and imported .po file with UI translations. It might be that when I have translated something this goes away, which may is the case why it hasn't been reported - so I thought I better do so before it's "sweeped under the carpet" as I don't think it should give this warning.
Comments
Comment #1
vikingew commentedCorrection: It's when you click "edit" link on content types overview page, like for Page, the warning is then displayed on top of the Page page.
Comment #2
vikingew commentedOk I have solved this one, it's due to CCK sets may lack fields (#options element) in the passed array. Sorry I can't provide a real patch but it's an easy one to do manually.
in i18nsync.module, starting with line 43
Hope it helps.
Comment #3
mixey commentedthanks, for the patch!
Comment #4
(not verified) commentedComment #5
Soren Jones commentedThe patch in #2, just in case anyone wants it.
Comment #6
milleusi commentedThx for the patch, but now I have this warning:
user warning: Unknown table 'node_data_field_imagine' in field list query: SELECT node.nid, node.changed AS node_changed_changed, node_data_field_imagine.field_imagine_fid AS node_data_field_imagine_field_imagine_fid FROM drupal6node node LEFT JOIN drupal6i18n_node i18n ON node.nid = i18n.nid WHERE (i18n.language ='en') AND ( (node.status = '1') AND (node.type IN ('poza')) ) ORDER BY node_changed_changed DESC LIMIT 0, 3 in /home/content/s/p/i/spinalcord/html/includes/database.mysql.inc on line 172.
ps:I don't use/have drupal6
Comment #7
jose reyero commentedThanks
@milleusi, that's an error related with a different table of a different module, I don't know what it has to do with i18n.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.