Hi,

if the referenced entity has only one view mode assigned, the selection of the used view mode doesnt work. The referenced entity has to have more than one view mode!

Fixing the bug is easy:

file: entityreference.module
hook: hook_field_formatter_settings_form
change:

if (count($options) > 1) {

into

if (count($options) > 0) {

Pls fix this

thank you
axe312

CommentFileSizeAuthor
#2 field_formatter-1541814-1.patch493 bytesbala.addweb

Comments

bala.addweb’s picture

Assigned: Unassigned » bala.addweb
Issue summary: View changes
bala.addweb’s picture

Assigned: bala.addweb » Unassigned
Status: Active » Needs review
StatusFileSize
new493 bytes

Please apply field_formatter-1541814-1.patch

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

patch applies cleanly, makes sense.

minoroffense’s picture

Status: Reviewed & tested by the community » Closed (works as designed)

If there's only one view mode why would you want to show the select element? There's nothing to choose. I'm closing as works as designed unless you can convince me it solves a UX or functional problem. Thanks.