media_mid argument handler does not exist and causes Broken/Missing Handler error in views

Created on 25 August 2023, over 1 year ago
Updated 26 August 2023, over 1 year ago

Problem/Motivation

scheduler_views_data_alter() overrides the argument handler for media_field_revision mid argument and set the plugin as 'media_mid' which doesn't seem to exist.

Steps to reproduce

  1. Create a Media Revision view
  2. Add a Contextual Filter (argument) using the Media Revision ID field
  3. Views shows broken/missing handler for the argument

Proposed resolution

Implement the media_mid argument handler or remove the override.

πŸ› Bug report
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States draenen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @draenen
  • πŸ‡ΊπŸ‡ΈUnited States draenen

    Here's a patch to remove the argument override. The referenced core issue is related to media revisions relationships not arguments so it's not clear to me why this was overridden in the first place.

    It may be the intention to provide an overridden media_mid handler but removing the override altogether fixes my use case.

  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom jonathan1055

    Hi draenen,
    I have tried but cannot replicate the problem. Here's what I did

    1. Create a view and in the second block 'view settings' select 'show media revisions' of type 'all'
    2. In the main views build page, top right 'advanced' block, 'contextual filters' click 'add'
    3. Type 'rev' to filter the list and select 'Revision id' in the Media Revision category, and click "add and configure"
    4. Leave the next page as defaults
    5. In the build page first column, add Filter Criteria and select Media Revision ID

    The view works fine, and I don't get any warning about a broken/missing handler. The view preview works, and if I create a page path then that works OK too. Obviously I'm missing out on some vital bit which you are doing that causes the problem. Happy to investigate this further, once I can replicate it.

    What version of Drupal core are you using? I tested with 9.5.10

Production build 0.71.5 2024