Hello, I notice some strange behaviour on the 'preview' page, when using nodereference autocomplete with 'unlimited' multiple values, it seems extra fields appear there for no reason?

Also I was wondering if anyone knows a smart way to disable the 2 default fields that appear on the node add/edit pages for nodereference (possibly userreference too) fields? I don't mind hooking in with a module.

Comments

danielb’s picture

Category: bug » support

Oh ok, this appears to be by design, so I'm changing this to a support request.

I've observed this behaviour:

When you first create a node, 2 fields show up by default
When you go back in to edit a node, 1 extra field shows up.
Every time you hit preview it appends an extra 2 fields

I would really like to disable these features with another module, or have them be configuration settings.

Could anyone point me to where in the content module these additions are made, and any suggestions as to what strategy I could use?

brmassa’s picture

Component: nodereference.module » content.module

Guys,

i confirm the "bug".

Its really a problem when you create a new widget type that manage its "#required" attribute itself, because you might add a new "extra" required fields. I have this situation on Addresses module, which creates, in fact, several form fields that have diferente "#required" values.

It should have both dev and enduser configuration for this feature.

regards,

massa

brmassa’s picture

Category: support » bug

and it might be considered a bug too

apshoemaker’s picture

Status: Active » Closed (won't fix)

I know this is rather old but, since it is still open, I wanted to add my notes.

I had this same issue and then found http://drupal.org/node/798932. It seems the two are related. CKEditor was placing a
tag in empty fields after clicking preview which was causing CCK to add more fields (as it should). Please note the patch in that thread that fixes the issue. It seems that this will be fixed in a later version of CKEditor and cannot be addressed within the integration module.

I am moving the state to "won't fix".

Paul

ergophobe’s picture

Status: Closed (won't fix) » Closed (duplicate)

Many duplicates of this issue and there is an ongoing main thread, so linking to thread and changing to duplicate

Main discussion is here: #320313: CCK multiple values: two empty fields showing up - make it one or none?