Posted by BoozyMondango on January 12, 2009 at 6:46pm
5 followers
Jump to:
| Project: | Flexifield |
| Version: | 6.x-1.0-alpha2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
It will add the select box, but will not populate it within a flexifield. Anyone come across this issue?
Thanks
Comments
#1
Is the issue with the Link field or the Node Reference field?
#2
it happens when you have a nodereference field inside a node in a flexifield. The view to populate the selector is simply not called.
#3
However it works with autocompletion fields so there is a workaround.
#4
Moving to corrct place, changing title.
#5
Actually, this is probably more of a flexifield issue.
#6
It appears that this is so because $form['#field_info'][$field_name] is not set inside the process function. flexifield tris to do something about it in flexifield_setup_form_field_info_hack but that does not appear to work.
#7
I've investigated this some more and I think the probkem is due to the fact that the nodereference field re-.uses the fields created the fields from the optionswidget module in its process function. This leads to the optionswidgets process function being called although not defined in the form and thus the tricks devised by the flexifield author don't work.
#8
This is now fixed in 6.x-1.x-dev (you can grab it from cvs or you may need to wait 12 hours for the tarball to be regenerated). I will release a 6.x-1.0-alpha2 version by March 4, 2009 that will also contain this fix.
#9
I believe this fix relies on a patch to form.inc, namely that you pass $complete_form by reference into form_builder_handle_input_element, is this correct?
#10
Nope. The fix works without any patches to drupal core or to cck. I'm hooking into the #process array of the specific element, where I'm inserting a function that takes the form by reference and is able to add '#field_info' to it in a way that sticks when the element's normal #process function is called. A lot more code than if form_builder_handle_input_element() took $complete_form by reference, but it does work with a clean drupal install.
#11
Alpha2 is released!
#12
Automatically closed -- issue fixed for 2 weeks with no activity.