Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291503

View embed display filters uses wrong action if there is another display with a path

$
0
0

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

  1. Fix DisplayPluginBase::getLinkDisplay in the case of custom_url being selected.
  2. If we have agreement, make DisplayPluginBase::getLinkDisplay only follow explicitly set links.

Viewing all articles
Browse latest Browse all 291503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>