Hi,

In my website when i'm trying to create a taxonomy term. I've researched for the error everywhere, i've updated drupal core and nothing happened. The taxonomy still shows though and i can add terms inside.

I really don't know what is going on and i could use your help!

FieldException: Attempt to create an instance of a field field_admin that doesn't exist or is currently inactive. in field_create_instance() (line 476 of /var/www/projects/<site>/modules/field/field.crud.inc). Backtrace:
field_create_instance(Array) newsletter.module:454
newsletter_taxonomy_vocabulary_insert(Object) 
call_user_func_array('newsletter_taxonomy_vocabulary_insert', Array) module.inc:895
module_invoke_all('taxonomy_vocabulary_insert', Object) taxonomy.module:449
taxonomy_vocabulary_save(Object) taxonomy.admin.inc:222
taxonomy_form_vocabulary_submit(Array, Array) form.inc:1513
form_execute_handlers('submit', Array, Array) form.inc:903
drupal_process_form('taxonomy_form_vocabulary', Array, Array) form.inc:385
drupal_build_form('taxonomy_form_vocabulary', Array) form.inc:130
drupal_get_form('taxonomy_form_vocabulary') 
call_user_func_array('drupal_get_form', Array) menu.inc:517
menu_execute_active_handler() index.php:21

Thank you in advance !

Comments

badzpeed’s picture

Category: Bug report » Support request
dcam’s picture

It sounds like at one time the newsletter vocabulary had a field attached to it with the machine name "field_admin," but at some point it was removed. It's possible that you removed it or it was removed by an update to the Newsletter module. Maybe the field was supposed to be added by an update, but wasn't. I wouldn't know. I'm not familiar with Newsletter.

Anyway, newsletter_taxonomy_vocabulary_insert() is expecting field_admin to exist, but it doesn't. That's the reason for the exception being thrown. Update Newsletter if you haven't recently. You may have to uninstall and reinstall Newsletter in order to get this field to install properly.

You'll be better off asking for support in Newsletter's issue queue. They should be able to diagnose the problem more accurately than I can. When you do (or if my suggestions fix your problem) then please reply here and set the issue status to Fixed.

badzpeed’s picture

Hi dcam, thank you for your reply, i'll do that and then i'll reply here and set it as fixed!

mahyarsbt’s picture

Hi guys,
I have same problem in create new taxonomy vocabulary, i can't find any solution to fix this.

FieldException: Attempt to create an instance of a field field_production that doesn't exist or is currently inactive. in field_create_instance() (line 476 of htdocs/modules/field/field.crud.inc).

I using Drupal Commerce Kickstart.

maxilein’s picture

dcam’s picture

Status: Active » Closed (fixed)

Closing old issues. The original support request was answered and the OP did not reply a second time.

JacksonBison’s picture

I had a hell of a time with this too, but couldn't fix it via any normal means...

The solution that worked for me was to create the necessary field before creating the taxonomy:

    $field = array(
        'field_name' => 'field_'.$taxonomy_machine_name,
        'type' => 'text',
        'label' => 'Label'
    );
    field_create_field($field);