I am using Biblio in a multi-language site where some content is multilingual but the biblio content type has no multilingual support enabled.

If i create a biblio node with the create content interface it gets properly created as "Language Neutral", but if i import some bibtex the nodes are created with the default language causing several problems and with no option to change them back to "Language Neutral" since i have no multilingual support enabled for biblio nodes and no option to change language appears.

I think the problem is on biblio.import.export.inc on lines 740-744 at the following code:

function biblio_save_node($node, $batch = FALSE, $session_id = NULL, $save_node = TRUE) {
  $options = variable_get('node_options_biblio', array ('status'));
  if (module_exists('i18n') && variable_get('i18n_node_biblio', 0)) {
    $node['language'] = module_invoke('i18n', 'default_language');
  }

Removing the if the import works well for me, but i am not sure if it breaks something when biblio nodes are multilingual. So for a permanent patch maybe the condition of the if could be rewritten so it only explicitly assigns the default language when multilingual support for biblio nodes is enabled.

Sorry for not including a full patch but i don't know much about PHP programming and i don't know which code to use to find if multilingual support is enabled, but i hope my explanations help for fixing it.

Juan Ramón

Comments

jrgonzalez’s picture

Assigned: jrgonzalez » Unassigned
rjerome’s picture

Status: Active » Fixed

Hi Juan Ramón,

I think I've solved this issue. As you suggested, I now also check to see it multilingual support is enabled, before setting the language to the default language.

Ron.

jrgonzalez’s picture

It works like a charm now :). Thanks for this one too :)

Status: Fixed » Closed (fixed)

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