Problem/Motivation
Embed displays don't have a path of their own. If it is the only display on the view, the exposed form will use the current URL, allowing you to filter an embedded view on whichever page it is embedded.
However, if the view has a display that does have a path, DisplayPluginBase::getRoutedDisplay
via DisplayPluginBase::getLinkDisplay
will simply return the first display with a path.
Furthermore, explicitly setting the link_display
option to custom_url
does not fix this, as custom_url
appears to ONLY be used by the more link.
Proposed resolution
Firstly, explicitly setting a custom url should be respected by exposed filters.
Secondly, I think we should only follow an explicitly set linked display. Anything else seems to be likely to cause unexpected behaviour. Explicitly setting a custom URL does not allow for embeds that could be in multiple places (other than argument replacements). My only hesitation is that this may be a backwards compatibility break if people actually rely on this odd behaviour.
Remaining tasks
- Fix
DisplayPluginBase::getLinkDisplay
in the case ofcustom_url
being selected. - If we have agreement, make
DisplayPluginBase::getLinkDisplay
only follow explicitly set links.