I encountered this with a taxonomy term reference field. To reproduce:

Make a taxonomy with some terms. In my case taxonomy "privacy", terms are "public" and "admin only".

Add taxonomy term reference field to a content type. Select that taxonomy.

Make the field optional (not required).

Select a default value (I chose "public").

Number of value: unlimited (multiselect).

Create an instance of the configured content type.

For your term reference field, select "- None -". Or, unselect all options. Either way reproduces the problem.

Save your new node.

Notice that your default value ("public") was saved, even though you had selected none!

Perhaps worth noting: if you edit the existing node, you can save it with no terms. That is, the problem happens when a new entity is saved, not when an existing entity is updated.

I'd be surprised if I'm the first to report a problem this serious. I googled but couldn't find it described elsewhere.

Comments

dcam’s picture

Duplicate of #1379070: Field with multiple select list does not allow "-None-" to be a default value. The other issue is RTBC and hopefully will be committed to 7.x soon.

Dave Cohen’s picture

Status: Closed (duplicate) » Active

In that other issue, the field cannot be configured such that the default is "none".

In this problem, a node is being tagged with a term that was not selected. "None" was selected, but the node was tagged with a term.

dcam’s picture

You're right, of course. I'm very sorry. I had trouble finding the duplicate issue yesterday and thought that was the one. This is the duplicate issue: #1253820: It's impossible to submit no value for a field that has a default value. It has been fixed in 8.x and is awaiting backport to 7.x, but apparently there will be difficulty in doing so.

Dave Cohen’s picture

Dupe of a 3 year old issue that hasn't seen a comment in 12 months. Great.