Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
field_ui.module contains this code:
function field_ui_field_settings_form_submit($form, &$form_state) {
// Do not allow changes to fields with data.
if (field_ui_field_has_data($field)) {
return;
}
However, I was able to edit a List field with data on an existing node. Also note that I did not get the message, "There is data for this field in the database. The field settings can no longer be changed." So it looks like field_ui_field_has_data() is not working, which is odd because it only uses field_attach_query() which should be working.
Marked critical because if people edit fields with existing data in the wrong way, bad things can result.
Comments
Comment #1
bjaspan CreditAttribution: bjaspan commentedIt looks like field_ui_field_edit_form() does not check field_ui_field_has_data(), while field_ui_field_settings_form() does.
Comment #2
bjaspan CreditAttribution: bjaspan commentedThis is being addressed by #367013: Field update (field_update_field).