This started last week after updating commerce and dependencies but only had change to debug. I've since updated and this remains.

I noticed some of my attribute fields were missing from display and not being rendered properly. It seems the issue is the commerce price field and the currency selection checkbox.

1. add a new or existing price field to an attribute or a content type, make no changes, save as normal, all fine.

2. edit the attribute and can see the field is not showing on any of the values (set correctly in form display). When looking at the code I can see the wrapper is there, but there is no label or input. (see attached image)

3. Re-edit the field, the input area for the default value input field is missing.

However... if I tick the currency checkbox (GBP is our currency) when creating the new field or adding an existing field, this does not happen, it all works as designed.

CommentFileSizeAuthor
#3 issue-2875328.patch975 bytesSimeonKesmev
debug.png73.58 KBsmartparty
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

smartparty created an issue. See original summary.

smartparty’s picture

Title: Price field issue - not rendering input/label - unable to edit » Price field issue - not rendering input/label - currency related
Issue summary: View changes
SimeonKesmev’s picture

Status: Active » Needs review
FileSize
975 bytes

The problem is related to the Price widget logic conflicting with the Price field type settings.
The field type settings are using both "select" and "checkboxes" element types for available currencies settings, but the checkboxes return array with both selected and unselected currencies which is not expected by the widget. The issue appears when no currencies are selected but the configuration is saved with array of keyed.
With this patch the field settings has to be resaved.

czigor’s picture

Status: Needs review » Closed (duplicate)