Node Reference broken when used with flexifield and selector

BoozyMondango - January 12, 2009 - 18:46
Project:Flexifield
Version:6.x-1.0-alpha2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

It will add the select box, but will not populate it within a flexifield. Anyone come across this issue?

Thanks

#1

JoeMcGuire - January 19, 2009 - 21:02
Status:active» postponed (maintainer needs more info)

Is the issue with the Link field or the Node Reference field?

#2

Gerhard Killesreiter - February 27, 2009 - 17:48

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

Gerhard Killesreiter - February 27, 2009 - 17:54

However it works with autocompletion fields so there is a workaround.

#4

Gerhard Killesreiter - February 27, 2009 - 18:17
Title:Node Reference broken when used with flexifield» Node Reference broken when used with flexifield and selector
Project:Link» Content Construction Kit (CCK)
Version:6.x-2.5» 6.x-2.1
Component:Code» nodereference.module
Status:postponed (maintainer needs more info)» active

Moving to corrct place, changing title.

#5

Gerhard Killesreiter - February 27, 2009 - 18:19
Project:Content Construction Kit (CCK)» Flexifield
Version:6.x-2.1» 6.x-1.x-dev
Component:nodereference.module» Code

Actually, this is probably more of a flexifield issue.

#6

Gerhard Killesreiter - February 27, 2009 - 21:53

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

Gerhard Killesreiter - March 1, 2009 - 19:13

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

effulgentsia - March 2, 2009 - 00:57
Status:active» fixed

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

Gerhard Killesreiter - March 2, 2009 - 11:43
Status:fixed» active

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

effulgentsia - March 2, 2009 - 20:24
Status:active» fixed

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

effulgentsia - March 4, 2009 - 02:42
Version:6.x-1.x-dev» 6.x-1.0-alpha2

Alpha2 is released!

#12

System Message - March 18, 2009 - 02:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.