Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291828

list_field_validate() doesn't seem to accommodate select lists with <optgroup>

$
0
0

This is an interesting bug.
I'm using the Inline Entity Form to edit line items.
So I'm editing a shipping line item, and the Shipping service field always falls validation with an "invalid value" error message.
The problem is that "allowed_values_function" returns an array with optgroups, so it has an extra level.
However, list_allowed_values() doesn't take that into account, and just does an isset on the first level, so of course it fails.
Now that I've written this, it sounds like a core bug, but it's late and I'm content with just documenting this in an issue for now.


Viewing all articles
Browse latest Browse all 291828

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>