If I enter the field settings form for the relation select field, I get a bunch of undefined index notices. These are caused by views, which don't have any 'style_plugin' defined. In my case it was a view with some blocks of related content.

Solution: Check if the style plugin is set.

Row 861 in .module

-      $styleplugin = $view->display['default']->display_options['style_plugin'];
+      $styleplugin = isset($view->display['default']->display_options['style_plugin']) ? $view->display['default']->display_options['style_plugin'] : NULL;

Sorry, didn't have the time to provide full patch, buts a one line ;)

Comments

steveoliver’s picture

Status: Active » Needs review
StatusFileSize
new1.49 KB

relation_select_get_views() got a little cleanup in the attached patch. Please let me know if it helps your issues.

steveoliver’s picture

Title: Check if 'style_plugin' is set in the view » Get all Views with relation_select displays, regardless of display id.
Status: Needs review » Closed (fixed)

Just committed to 7.x-1.x (7f92a7b). Updated title. Closing.

nadavoid’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs review
StatusFileSize
new2.84 KB

New patch that enables support for displays that haven't overridden the display option setting of the default display. This is based on views' get_option() function which looks in the current display, then falls back to the default display.

Sorry to reopen a 3-year-old issue, but it seemed like such a logical place to put this patch.

  • nadavoid committed 7f50e99 on 7.x-1.x
    Issue #1735490 by nadavoid, steveoliver: Get all Views with...
nadavoid’s picture

Status: Needs review » Closed (fixed)

committed latest patch in 7f50e999430ec584978c25b7841cf619897e7fb8.