Change record status: 
Project: 
Introduced in branch: 
11.5.x
Introduced in version: 
11.5.0
Description: 

What changed and why
Views no longer automatically selects the first display with a path when an unrouted display, such as a Block or Embed display, has no explicit Link display configured.

Previously, DisplayPluginBase::getLinkDisplay() searched the View's displays and selected the first display with a path. This meant that selecting None could still cause an exposed form or Views bulk form to submit to an unrelated Page, Feed, REST Export, or other routed display. The selected URL could also change when displays were reordered.

DisplayPluginBase::getLinkDisplay() now returns only:

  • The configured custom URL option.
  • An explicitly configured link display, if that display still exists.
  • NULL when no valid link display is configured.

Views exposed forms and Views forms, including bulk operation forms, now determine their action URL in the following order:

  1. If the current display has a route, or explicitly links to a routed display, use that URL.
  2. If Link display is configured as a custom URL, use the configured URL.
  3. During an AJAX rebuild, preserve the path of the page containing the View.
  4. Otherwise, use the current route.

Backward compatibility
A post-update preserves existing behavior for sites that relied on the previous automatic selection. During the update, Views performs the old lookup once for eligible unrouted displays and stores the resulting routed display as an explicit link_display configuration value.

This moves the previous implicit behavior into explicit configuration for existing Views, while preventing newly created or subsequently imported configuration from relying on display-order guessing.

Before
A Block or Embed display with Link display: None could silently use the first routed display found in the View. Its form action therefore depended on the View's display order rather than its configuration.

After
Existing Views retain their previous form target through the post-update's explicit configuration. A new unrouted display with no link display configured uses the current route instead. Explicit linked displays and custom URLs continue to be honored.

Action required
No manual change is normally required for existing sites after running database updates. Sites using configuration management should export any link_display values added by the post-update.

For new or imported View configuration, explicitly configure Link display or Custom URL when an exposed or bulk form should submit somewhere other than the current route. Routed displays, such as Page displays, require no change.

Impacts: 
Site builders, administrators, editors
Module developers