Every time I try to create a field with Drush, I get the following error message.
WD php: FieldException: Attempt to create an instance of field section_heading [error]
without a bundle. in field_create_instance() (line 460 of
/home/dir/public_html/drupal/modules/field/field.crud.inc).
WD php: Warning: Cannot modify header information - headers already sent by [warning]
(output started at /home/dir/src/drush/includes/drush.inc:1099) in
drupal_send_headers() (line 1018 of
/home/dir/public_html/drupal/includes/bootstrap.inc).
FieldException: Attempt to create an instance of field section_heading without a bundle. in field_create_instance() (line 460 of /home/dir/public_html/drupal/modules/field/field.crud.inc).
Drush command terminated abnormally due to an unrecoverable error. [error]
I though this would be quite a common issue, but I have searched around and cannot find any solutions.
Comments
Comment #1
moshe weitzman commentedWhat is the command you are running? Make sure you are passing a bundle argument and entity-type option if needed.
Comment #2
big_smile commentedThe command I am using is this:
drush field-createI get the options to select a widget and name a field.
However, it is when I get to the final step that the error message (see the opening post) appears.
Comment #3
1kubik commentedhi there
got the same error while installing the rooms module by drush
(on drupal 7.9 and drush all-versions 5)
'WD php: FieldException: Attempt to create a field of unknown type number_integer. in field_create_field() (line [error]
106 of /var/www/virtual/einkubik/html/modules/field/field.crud.inc).
Cannot modify header information - headers already sent by (output started at [warning]
/var/www/virtual/einkubik/drush/includes/output.inc:37) bootstrap.inc:1212
FieldException: Attempt to create a field of unknown type number_integer. in field_create_field() (line 106 of /var/www/virtual/einkubik/html/modules/field/field.crud.inc).
Drush command terminated abnormally due to an unrecoverable error. "
yeah, me too. found nothing else except this post
could you fix this meanwhile?
best regards
stef
Comment #4
big_smile commentedI found the solution to this. When you use
drush field-createyou need to specify a content type.E.g.
drush field-create newsfor a content type called newsdrush field-create indexfor a content type called indexComment #5
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If you still need help, please ask your question again on Drupal Answers and then post a link here to the new question. Please also change the status of this issue to
closed (duplicate).Use our Github project for contributing code, or reporting bugs, or requesting features.
Comment #5.0
greg.1.anderson commentedfixed code