Admin can set plugin ids for a field in the field settings. Currently views are made available to select that do not have the particular plugin id(s) selected in the settings.

Create a further filter in the Views code that removes any views that do not have the included plugin types.

Comments

New Zeal created an issue. See original summary.

  • New Zeal committed 722d5ce on 8.x-1.x
    Issue #2895108: Field form plugin Id display selection refinements -...
NewZeal’s picture

Adding a patch for this so that it can be added to 2.x.

Note that the patch also includes a fix for when attempts are made to save a View name without a display id.

  • seanB committed b1587db on 8.x-2.x authored by New Zeal
    Issue #2895108 by New Zeal: Field form plugin Id display selection...
seanb’s picture

Committed to 2.x with minor changes. I believe the UX can be improved a bit more by filtering the view names that lead to the error (why show the view in the first field if selecting it will lead to an error right?). If we fix that we can remove the JS that shows the error again.

NewZeal’s picture

I agree, limiting the Views before they are presented would be ideal.

I had a brief look at this but attempting to filter the items available to the entity autocomplete requires deep Drupal penetration and I currently don't have the time. It may be easier to do it for the select field I don't know I haven't looked.

  • New Zeal committed 3dc8023 on 8.x-1.x
    Issue #2895108 by New Zeal: Field form plugin Id display selection...
NewZeal’s picture

This problem may be solved in the same way that entity reference views can be used to filter a reference field. That would be the first place to look. Anyway we should probably leave this ticket open for potential contributions.

NewZeal’s picture

Status: Active » Closed (works as designed)

No followup occurred. Closing issue.