FieldPluginBase::renderAsLink() allows query alteration but Links::getLinks() does not take that into account

Created on 3 May 2014, about 11 years ago
Updated 7 April 2025, 3 months ago

The \Drupal\views\Plugin\views\field\FieldPluginBase::renderAsLink() method that is responsible for rendering Views fields as links allows us to programmatically set 'query' arguments but the \Drupal\views\Plugin\views\field\Links::getLinks() method that \Drupal\views\Plugin\views\field\Dropbutton uses to render links as operations/actions does not take this into account.

I've attached a small patch that fixes this. Though I think the design of Links::getLinks() is very wrong because all link alterations are totally ignored and therefore it should be rewritten. I think the Dropbutton plugin should probably use render arrays for the dropbutton element.

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

views.module

Created by

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • Status changed to Closed: outdated 2 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Since there's been no follow up in 3+ months going to close this one out.

    Thanks!

Production build 0.71.5 2024