Hi,
after upgrading D6>D7 some node-type-templates are throwing a warning:
Warning: number_format() expects parameter 1 to be double, string given in number_field_formatter_view() (Zeile 294 von /kunden/.../modules/field/modules/number/number.module).

For example, this warning occurs after adding text to an textarea. Why is drupal expecting double for an text area?
Taxnomy references can produce this warning as well.
Doesn´t matter which theme is activated, warning is always thrown.

Cheers

Comments

John_B’s picture

Since you are on a German-speaking system, the answer to this thread may also be relevant http://stackoverflow.com/questions/12470764/warning-number-format-expect...

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

kbrinner’s picture

I too am seeing this on a Drupal site I recently upgraded from D6 to D7. For example, see the staging site at http://evergreen.rikuni.com/abelia-rose-creek.
In my case this seems to be related to the 'height' field for this content type. This is for a non-required checkbox/radio buttons widget with possible values:

Low|Low
Medium|Medium
Tall|Tall
Semi Dwarf|Semi Dwarf
Standard|Standard
Dwarf|Dwarf

It is strange as the selected option for this node (Low) is not being displayed when viewing the node, rather a broken image is displayed. Also, the Growth Rate field is a checkbox/radio button and it isn't experiencing the same strange behavior.

I took over this site from unknown developers to do the upgrade, so I am still trying to figure out some of the whacky things they seem to have done to the original site. You can see the live D6 version of this site at http://evergreennursery.com/abelia-rose-creek - you can see the Height option is being displayed without issue.

kbrinner’s picture

When I go back and check my content migration, I do see the following errors:

Notice: Undefined index: unformatted in number_content_migrate_instance_alter() (line 157 of .../sites/all/modules/contrib/cck/modules/content_migrate/modules/content_migrate.number.inc).
Notice: Undefined index: product in content_migrate_get_options() (line 58 of .../sites/all/modules/contrib/cck/modules/content_migrate/includes/content_migrate.admin.inc).

I'm guessing this is probably related since the 'product' content type is the one that is throwing the errors when viewing those nodes.

bloke_zero’s picture

I found going and editing the display format sorted this out.