In issue #1013716: key|value pairs not working on display the select_or_other_content_allowed_values_alter() was introduced. (Probably added in 6.x-2.4.) This function populates the allowed values of CCK's Text widget using the options from the Select Or Other widget. It does it only when $_POST['op'] is not t('Save'). This effectively prevents deleting a node with validation error %name: illegal value. because in that case this condition is true. It is also true when renaming the Save button's value (using the Module Node Form Settings for instance).

Quick fix would be to add $_POST['op'] != t('Delete') to the condition. That will not help though if the buttons value(s) is renamed to something other.

CommentFileSizeAuthor
#1 1105298-1.patch726 bytesfuerst
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fuerst’s picture

Status: Active » Needs review
FileSize
726 bytes

Quick fix is attached as a patch.

danielb’s picture

Yeah using the labels kinda sucks, I will try to find another way to create the same logic but in a way that doesn't rely on button label.

danielb’s picture

I don't think there are any other ways to do this other than what you said. It's really a design flaw in CCK.

danielb’s picture

Status: Needs review » Fixed

I've added your patch in.

Status: Fixed » Closed (fixed)

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