Closed (fixed)
Project:
Computed Field
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Nov 2013 at 23:29 UTC
Updated:
2 Sep 2015 at 15:04 UTC
Jump to comment: Most recent
I've tried to revert computed field from feature and got the next error:
FieldUpdateForbiddenException: field_sql_storage cannot change the schema for an existing field with data. in field_sql_storage_field_update_forbid() (line 236 of /home/drupalpro/websites/hof.loc/docroot/modules/field/modules/field_sql_storage/field_sql_storage.module).
The reason of that was comparing default value '0' (integer) with empty string '' in computed_field.install:
if ($settings['database']['data_default'] != '') {
$columns['value']['default'] = $settings['database']['data_default'];
}This condition returns FALSE so got changed field schema and as the result the exception.
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| computed_field-wrong_default_value_while_feature_reverting.patch | 702 bytes | drupalway |
Comments
Comment #1
illeace commentedI was running into this same problem and confirm that it fixes that error.
Comment #2
hughworm commentedJust had to apply this patch (fixed thanks!). Any chance it could at least get into the dev version? (It's taken me nearly 2 hours to chase this bug down :-0 )
Comment #4
ram4nd commented