When trying to save decimal or float number following error occurs.

    Notice: Undefined index: field in field_widget_field() (line 578 of /home/gimnastika/public_html/modules/field/field.form.inc).
    Notice: Undefined index: instance in field_widget_instance() (line 603 of /home/gimnastika/public_html/modules/field/field.form.inc).
    Warning: preg_replace(): Compilation failed: range out of order in character class at offset 14 in number_field_widget_validate() (line 389 of /home/gimnastika/public_html/modules/field/modules/number/number.module).
    Only numbers and the decimal separator () allowed in .

Comments

dmiric’s picture

Version: 7.x-2.0-rc1 » 7.x-2.x-dev

Same problem here. If field is not filled. If value in field is a number then then I get

Only numbers and the decimal separator () allowed in .

it happens if number is just an integer and if value value is a decimal number no matter if comma or dot is used as separator.

Decimal field is working correctly on node form.

Using drupal 7.17 and dev or RC1 release of ECK.

thirdender’s picture

I was having a similar problem with Image fields. The error I was getting was slightly different:

Notice: Undefined index: field in field_widget_field() (line 578 of /drupal7/modules/field/field.form.inc).
Notice: Undefined index: field in field_widget_field() (line 578 of /drupal7/modules/field/field.form.inc).
Notice: Undefined index: instance in field_widget_instance() (line 603 of /drupal7/modules/field/field.form.inc).
Notice: Undefined index: instance in field_widget_instance() (line 603 of /drupal7/modules/field/field.form.inc).

The problem was fixed by the patch from Date popup not working within field collection for eck entities, which is the same as the patch from Wrong form builder definition.

acrazyanimal’s picture

Status: Active » Closed (duplicate)