Give the gift of Drupal. All merchandise is 50% off through 2016.
Original issue report
When I try to style fields on a product display node that are inherited from the product_reference to the product entity, it doesn't work when using multiple build modes.
With the help of Display Suite I added a custom build mode to the product entity, as well as to the product display node.
However the fields on the product display node get rendered via the product entity "Default" view mode, which is not the intended behavior.
This seems to be caused by the fact that field_view_field() takes the view mode name for core view modes with a prefix (e.g. node_full, node_teaser, node_rss, ...) while custom view modes through Display Suite don't.
I created a patch that tries to address this problem.
This has already come up in and , but appeared to have been in the wrong issue context.
Hence this dedicated issue, and an updated patch.
If this belongs within a "bigger picture" issue, let me know.
Note to future readers
The committed fix to this issue has the effect of exposing more display modes to the 'manage display' section of products. If you have an existing site where you tried to manipulate the display of product fields by setting "Use custom display settings" for YourCustomViewMode, this will not work. You need to:
- clear all caches
- at admin/commerce/products/types/product/display, turn on "Use custom display settings" for "Node: YourCustomViewMode"
- migrate your field display settings from "YourCustomViewMode" to "Node: YourCustomViewMode"
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch commerce_product_reference_custom_view_modes-1230830-1.patch. Unable to apply patch. See the log in the details link for more information. View