1

Topic: data_entry_helper error

Hi...
today i have found an other error when i try to use the Utilities -> Change identification of a record


    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6594 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6605 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6611 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6594 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6605 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6611 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6594 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6605 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6611 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6594 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6605 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6611 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6594 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6605 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6611 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6594 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6605 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).
    Notice: Undefined index: fieldprefix in data_entry_helper::getAttributes() (line 6611 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/data_entry_helper.php).

I have checked the code and shouild be in these lines:

...
    foreach ($response as $item){
      $itemId=$item['id'];
      unset($item['id']);
      $item['fieldname']=$options['fieldprefix'].':'.$itemId.($item['multi_value'] == 't' ? '[]' : '');
      $item['id']=$options['fieldprefix'].':'.$itemId;
      $item['untranslatedCaption']=$item['caption'];
      $item['caption']=lang::get($item['caption']);
      $item['default'] = self::attributes_get_default($item);
      $item['attributeId'] = $itemId;
      $item['values'] = array();
      if(count($valueResponse) > 0){
        foreach ($valueResponse as $value){
          $attrId = $value[$options['attrtable'].'_id'];
          if($attrId == $itemId && $value['id']) {
            // for multilanguage look ups we get > 1 record for the same attribute.
            $fieldname = $options['fieldprefix'].':'.$itemId.':'.$value['id'];
            $found = false;
            foreach ($item['values'] as $prev)
              if($prev['fieldname'] == $fieldname && $prev['default'] == $value['raw_value'])
                $found = true;
            if(!$found)
              $item['values'][] = array('fieldname' => $options['fieldprefix'].':'.$itemId.':'.$value['id'],
                                'default' => $value['raw_value'], 'caption'=>$value['value']);
            $item['displayValue'] = $value['value']; //bit of a bodge but not using multivalue for this at the moment.
          }
        }
      }
...

How can i solve? i use PHP 5.3

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

2

Re: data_entry_helper error

Hi Carlo
Thanks for the feedback - I've posted a fix to the code at https://code.google.com/p/indicia/source/detail?r=9442 and you can download the file at https://indicia.googlecode.com/svn-hist … cation.php - I hope that helps.
Best wishes
John

John van Breda
Biodiverse IT