Hello,

I'm getting the following warnings for a while now. Does someone know how to solve this?

Notice: Undefined index: field_prijs in entity_translation_views_data_alter() (regel 237 van /var/www/html/drupal-7.33/sites/all/modules/entity_translation/views/entity_translation.views.inc).
Notice: Undefined index: help in entity_translation_views_data_alter() (regel 240 van /var/www/html/drupal-7.33/sites/all/modules/entity_translation/views/entity_translation.views.inc).

This is line 235-243 from entity_translation.views.inc

foreach ($defaults as $table_name => $table_data) {
        if (isset($data[$table_name][$field['field_name']])) {
          $field_title = $table_data[$field['field_name']]['title'];
          $table_data[$field['field_name']]['title'] = t('!title: translated', array('!title' => $field_title));
          $table_data[$field['field_name']]['group'] = t('Entity translation');
          $table_data[$field['field_name']]['help'] .= ' ' . t('Show the field !title translated into a specified language', array('!title' => $field_title));
          $table_data[$field['field_name']]['field']['handler'] = 'entity_translation_handler_field_field';
          $data[$table_name][$field['field_name'] . '_et'] = $table_data[$field['field_name']];

Thanks in advance,
Mariska.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MariskaTh created an issue. See original summary.

pflork’s picture

Hi Mariska,

I'm also seeing this with Drupal 7.50 and last Entity Translation dev (7.x-1.0-beta5+12-dev (2016-sep-06)....but I'm seeing this since a long time. Have you solved this ?
If not someone else ?
Thanks in advance.
Pascal

LIQUID VISUAL’s picture

I get this error as well, on site that is otherwise working fine.

xdelfino’s picture

I also have this message some solution to this warnings?
no one solved this?

Notice: Undefined index: commerce_order_total in entity_translation_views_data_alter() (linea 237 /sites/all/modules/entity_translation/views/entity_translation.views.inc).
Notice: Undefined index: help in entity_translation_views_data_alter() (linea 240 /sites/all/modules/entity_translation/views/entity_translation.views.inc).

Thanks

xaa’s picture

notice still visible with the latest 7.x-1.0 (drupal 7.64)

danyg’s picture

Hello,

here is a simple patch which fixes the undefined index problem.

stefanos.petrakis@gmail.com’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Category: Support request » Bug report
Status: Active » Needs review
stefanos.petrakis@gmail.com’s picture

Status: Needs review » Reviewed & tested by the community

This extra condition is a simple sanity check, going to commit this soon, thanks for the report and patch!

  • stefanos.petrakis committed 1ee3655 on 7.x-1.x
    Issue #2580231 by danyg, stefanos.petrakis, MariskaTh: Undefined index...
stefanos.petrakis@gmail.com’s picture

Status: Reviewed & tested by the community » Fixed

Commited and pushed, thanks again!

Status: Fixed » Closed (fixed)

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