existing views don't cope with a change to plugins in Views data

Created on 26 September 2019, over 5 years ago
Updated 24 January 2025, 3 months ago

I'm trying to apply the patch from πŸ› use the 'bundle' filter plugin for non-entity bundle fields Needs work to a site that has existing views with bundle filters. The patch changes the filter plugin ID that is set on bundle fields in Views data:

- before, a non-entity bundle filter just showed a text field, using the 'string' plugin
- after the patch, the plugin is 'bundle', which shows a select form element with the bundle names

My existing views aren't picking up this change.

- If I open the bundle filter edit popup, it still shows the form for the old plugin, that is, a text field
- Weirdly, if I right-click and open the edit form for the bundle filter in a new browser tab, then I get the new plugin. But I can't save it -- I get the 'Illegal choice' error.

It seems there is some conflict between the plugin ID that's baked into the view, and the plugin ID that's defined in Views data.

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

views.module

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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

    This came up as the daily bugsmash target. Wonder if the summary can be updated with clearer steps to reproduce to verify if still an issue.

  • πŸ‡¬πŸ‡§United Kingdom joachim

    There'd be 2 ways to reproduce this:

    1. Artificially change the plugin on a Views field in Views data, and check that a view using that field doesn't pick up on it
    2. Get an entity type with code-based bundles, and use the patch mentioned in the IS.

    I'm not sure which is easier -- are there any examples of code-based bundles in core or contrib?

  • πŸ‡¬πŸ‡§United Kingdom joachim

    > 1. Artificially change the plugin on a Views field in Views data, and check that a view using that field doesn't pick up on it

    On reflection, this is probably easier.

    1. Make a view with a field, say on the node title
    2. Create and enable a custom module which:
    -- has a Views field handler plugin which always outputs 'banana'
    -- implements view data alter hook which sets this plugin for the node title field
    3. Existing view should now show 'banana', but it still uses the original plugin

  • Status changed to Closed: won't fix 6 days ago
  • πŸ‡¦πŸ‡ΊAustralia acbramley

    This contradicts πŸ› Views handler loading should respect configuration Active and that issue is doing the opposite - enforcing the plugin is used via config.

Production build 0.71.5 2024