When the default display of a view uses the relation_select display handler and the other displays don't override this default display handler, the others displays are not returned by relation_select_get_views(). As such, these displays are not selectable for a field.

relation_select_get_views() checks for $view->display[$id]->display_options['style_plugin'], but that entry does not exist when it uses the value from the default display. Perhaps relation_select_get_views() should use set_display and then check current_display.

CommentFileSizeAuthor
#2 relation_select-1673434-2.patch1.47 KBjorrit

Comments

steveoliver’s picture

I see what you're saying. Any .patch?

jorrit’s picture

Status: Active » Needs review
StatusFileSize
new1.47 KB

Here you go. I have taken the liberty of replacing views_get_all_views() with views_get_enabled_views(). If you don't agree with this, please change it back.

steveoliver’s picture

Status: Needs review » Fixed

Committed to 7.x-1.x.

jorrit’s picture

Thanks for the quick reply & commit! Could you take a look at #1658114: Error: Deprecated function: Call-time pass-by-reference drupal_load() line 1128 bootstrap.inc as well? Should be a quick online fix.

Status: Fixed » Closed (fixed)

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