I created a module with a .info, .module and .install file that can be installed by customers. This module file to create content types from node consists basically atm of:

/**
* Implements hook_node_info()
*/
function mycontent_node_info() {
  return array(
    'mycontent' => array(
        'name' => t('My content'),
        'base' => 'mycontent',
        'description' => t('You can define your objects here'),
        'has_title' => TRUE,
        'title_label' => t('Object title')
       )
    );
}

/**
* Implement hook_form()
*/
function mycontent_form($node, $form_state) {
   return node_content_form($node, $form_state);
}

The problem is as follows:

I want to use entity translation. This works fine but the title module because the default language is not filled.

E.g. if default language is German, the title is not saved. When I translate in English, the English title is saved. When I debug I can see that the complete (German or English) form is taken, the value of the form state are identical except the content itself and the language values 'de' and 'en'.

If I change en as default language then english title is not saved.

Has anybody an idea what i going wrong?

Thx in advance,

maen

CommentFileSizeAuthor
#2 title_field_db.png29.29 KBmaen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maen’s picture

Issue summary: View changes
maen’s picture

FileSize
29.29 KB

To be more specific, the value of my title field look like this:

empty german value

Has anybody an advise?

Thx in advance,

maen