Closed (fixed)
Project:
NPR
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
29 Mar 2013 at 18:14 UTC
Updated:
26 Sep 2013 at 15:20 UTC
When trying to uninstall and re-install story or fields module the creation of fields that already exist in the DB throws and error and fails.
for instances we need to change the field_create_instance() call to be wrapped like this:
if (!empty($instance['field_name']) && !field_read_field($instance['field_name'])) {
field_create_instance($instance);
}And for when we create fields something like this:
if (!field_read_field($audio['field_name'])){
field_create_field($audio);
}
Comments
Comment #1
musicalvegan0 commentedPlease see this issue for more information.
Comment #2
crookednumber commentedRe-opening. Sorry, I should have assigned this to myself at the start. (Until recently, it was just me in the queue - so that wasn't necessary. But I'll be more conscientious in the future.)
Comment #3
crookednumber commentedComment #4
crookednumber commented[7.x-1.x 2e8bdee] Issue #1956510 by CrookedNumber: Modules cannot be installed repeatedly.
2 files changed, 21 insertions(+), 7 deletions(-)
http://drupalcode.org/project/npr.git/commitdiff/2e8bdee
Comment #5
crookednumber commentedBug here. Should be testing for non-existence of INSTANCE rather than field.
[7.x-1.x 789e2e5] Issue #1956510 by canofcorn, CrookedNumber: should check for INSTANCE existence, not field
1 files changed, 1 insertions(+), 1 deletions(-)
Comment #5.0
crookednumber commentedwrapping code in code elements