1

How do I convert an existing integer field to text without having to copy paste manualy each value on each node and then delete the old integer field I´m using Drupal 7.9

I tried altering the database.. on the definition of the field and the value type I'm still getting errors

Notice: Undefined property: stdClass::$field_ubi_gps_x_format en field_sql_storage_field_storage_load() (línea 360 de /modules/field/modules/field_sql_storage/field_sql_storage.module).

Notice: Undefined variable: regexp en number_field_widget_validate() (línea 389 de /modules/field/modules/number/number.module).
Warning: preg_replace() [function.preg-replace]: Empty regular expression en number_field_widget_validate() (línea 389 de /modules/field/modules/number/number.module)

that is because the validation and presentation of the field has remained as integer.. I can't find in the DB where it stores that to copy if from another text field

I've so far altered field_data_field_FIELDNAME_THAT_WAS_INT changing field_FIELDNAME_value from int to varchar and paradores_field_config . copying the blob data field from a text to ID of the FIELDNAME and using text on type and module fields

  • 1
    finally I've done it by creating another content with a text type and imorted all data from the table field_data_field_FIELDNAME_THAT_IS_INT to field_data_field_FIELDNAME_THAT_IS_TEXT ..empty the cache and voilla, all works.. then deleted the old one – PartySoft Nov 17 '11 at 17:54
-1

You would have to change the type in field data and field revision tables and add the FIELD_NAME_format column in both the tables. Change the type and module columns in field_config to 'text'. And change the data column in field_config and field_config_instance tables.

For more info on this you can visit this link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.