I'm trying to generate a basic site content structure with menu_import, and for some reason the new nodes do get created, but they have no body: if I look at the $node with devel, I can see $node->body is just an empty array. Nothing.

Note that this is a multilingual site.

At first I thought it was because the body was stored in the wrong language, because if I edit the body manually via the Drupal CMS node edit interface, the body is apparently stuffed under the "unk" language instead of the actual language of the node. (Thus: although the node language is "fr", for example, the node body still is under $node->body['unk'][0].)

I thought replacing $node->body[$node->language] with $node->body['unk'] in menu_import_create_node() might fix it, but actually nothing is changed.

Any clue as to why I cannot create nodes with a body, and what I need to do to have node_save() actually accept and store the body contents? Did I, perhaps, forget to enable a module which is needed for this to work?

This is a brand new Drupal 7 install, BTW, I can always trash it and start totally anew, if somehow my Drupal install got corrupt.

p.s. Drupal 7's multilinguage support is pretty much crap, internally. Just my humble opinion. :) And yes, I'm guessing this might actually be a bug in Drupal 7, and not in this module.

Comments

bartl’s picture

Category: support » bug

Looking around a bit, I found http://drupal.org/node/1304718.

I was on the right track, but I used the wrong "language" value: it must be "und", not unk" (duh!) But actually, there's a nice global constant for that: LANGUAGE_NONE.

So I'm raising this to a bug report.

lex0r’s picture

Status: Active » Closed (fixed)

Fixed in RC4