I created a node reference field with unlimited selection for product content type. I created some nodes and selected the data in node reference and saved it. In database I checked and the data was saved properly and also checked on node edit. Now using display suite I created a 2 column layout and set the node reference field in hidden status as I didn't wanted users to edit that field. Now when I edit that node and save it my node reference field data gets deleted. This is happening with multiple selection and unlimited selection field and not with single selection.

Can someone please look into this issue ASAP and this is creating a major issue in my site.

Comments

aspilicious’s picture

I think I saw the same behavior on one of my projects. We used a quick work around, out it inside the display but set the access to false in a hook_form_alter.

swentel’s picture

Assigned: sunil.drupal » Unassigned
Priority: Critical » Major
Status: Active » Postponed (maintainer needs more info)

Mmm, good catch, we should probably move the #access => FALSE that ds_forms does into the form alter, so the form actually knows what happens with the field

swentel’s picture

Priority: Major » Critical
Status: Postponed (maintainer needs more info) » Active

Woops, didn't mean to change statuses

aspilicious’s picture

Status: Active » Postponed (maintainer needs more info)

I just tried to reproduce this but I failed.
Steps I followed:

1) Create a content type with an unlimited node reference (entity reference module) widget
2) Create a node with that content type and add a couple of references
3) Move the entity reference field to hidden
4) Edit the node and save it
5) Put the entity reference back into a visible region

After step 5 I can see my original references

Are you on latest entity reference? If not can you upgrade and see if it fixes your issue?

docwilmot’s picture

same issue, using node reference (references module) not entity reference.

hideaway’s picture

This is absurd and really shame! I must say!

We were losing pretty much of data through a long period because of this bug and we realized this now. We have editing tool when only few fields can editors modify and thus nobody noticed that hidden fields, which were taxonomy references with Unlimited instances, were destroyed during the process. I want to express huge disappointment with this module. I had many issues with it throughout the last few years, but this is nail in the coffin!

I am not mentioning that this bug is here over a year...

aspilicious’s picture

I asked for more information and/or steps tot reproduce but I didn't get them. So I'ts kinda brutal to say such things without providing me with accurate steps to reproduce, because I can't find a way to brake it...

aspilicious’s picture

@hideaway I'm still waiting for your input.

aspilicious’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)