I am getting an error when running database update 7102
I have debugged it down to these lines in synonyms.install
function synonyms_update_7102() {
$field = field_info_field('synonyms_synonyms');
$field['locked'] = FALSE;
field_update_field($field);
field_info_field returns NULL, so field_update_field fails with
Executing synonyms_update_7102 [notice]
Undefined index: field_name field.crud.inc:222 [notice]
Attempt to update a non-existent field. [error]
via drush, or
synonyms module
Update #7102
Failed: FieldException: Attempt to update a non-existent field. in field_update_field() (line 224 of .../html/modules/field/field.crud.inc).
via the UI
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2626460-4.patch | 616 bytes | peter.walter |
Comments
Comment #2
peter.walter commentedComment #3
sashken2 commentedI have same error too.
Comment #4
peter.walter commentedSee attached patch which makes the update conditional on the field existing.
Comment #6
bucefal91 commentedThank you, guys. and I am tremendously sorry, I must have only tested it with enabled default field. Thank you for reporting it.
I confirm your patch solves it. I have committed your patch into the repository and then tagged a new release: 7.x-1.4 so the folks who haven't updated yet get to update with a functional update hook.
Fiufff.. I feel so ashamed for publishing a broken release :) (it's my 1st time and I've already made conclusions about it). I rushed it for no real reason, as a matter of fact I coded the update path just a few weeks ago and that code spent only few days (or even hours) in the dev snapshot before I released it as 7.x-1.3... and I didn't get not a single feedback from community on the update path #2592623: v12 to latest dev upgrade Though I did test myself.