Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
field system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2012 at 21:50 UTC
Updated:
6 Oct 2017 at 09:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dkre commentedCan you provide more information?
What modules do you have installed, or using which effect the node/field which is creating the error? Specifically do you have any custom widgets?
Comment #2
mike_sandes commentedI'm getting the same error message after editing an entity when using an image field in the entity - as soon as I delete the image field the error dissapears.
I'm using Drupal 7.20
Modules (all updated) are :- ctools, date, partial date, display suite, entity construction kit, entity reference, field group, link, backup & migrate, chosen, colorbox, entity API, entity tokens, libraries, pathauto, token, views, views UI.
Custom widget module in use is 'Chosen'
Screenshot attached.
Thanks
Comment #3
Kimitri commentedWe bumped into this problem with one of our sites, too. We're running the site on Drupal 7.15 with quite a lot of modules enabled. Our module list does, however, intersect partially with the one submitted by mike_sandes. The modules we have in common are:
From this list I'd like to point out the Date and Field Group modules. In addition to spitting out bunch of the aforementioned notices referring to the field_widget_field and field_widget_instance functions, we also get a notice of an undefined index in the date_combo_element_process function.
I could be very wrong but my guess is this error is related to failing to parse element parents when certain field widgets are nested inside field groups. After some furious googling I found out that this has caused some problems with date field widgets provided by the Date module as well as file upload widgets provided by the core. (Both widget types are present in the form we're having problems with.)
We're about to update the core and all contrib modules on the site anyway, so I guess we'll have to see if that fixes things. The Date and Field Group modules are already in their most recent recommended versions, though. In our case, the problem occurs very randomly. In majority of cases the form submissions work OK and no notices appear. This could be indicative of some kind of a glitch happening in the form cache.
Comment #4
kristi wachter commentedI also encountered this issue; in my case, it was after trying to update a Boolean field using Views Bulk Operations.
I did have the field placed within a Field Group, and based on Kimitri's idea, I tried moving it out of the group, but I still got the same error message.
Comment #5
nrackleff commentedI am experiencing this as well, but only on new entities, not on existing entities. When I select a file and click the upload button, the entire widget disappears. The file is uploaded, but it is not attached to the node/comment when the node is saved. Works fine when attaching a file to a new comment on an existing node. We have an entity that just has a title field. When creating a new entity, the user may comment at that time and the file field is attached to the comment. The full error is
Notice: Undefined index: field in field_widget_field() (line 578 of /modules/field/field.form.inc).The following code is used to attached the comment form to the node.
Please let me know if I can provide any more information.
Comment #6
purplemind commented@nrackleff, be sure that $comment is not null before call field_attach_form.