Views RSS view mode settings are completely broken

Created on 26 October 2015, over 9 years ago
Updated 30 January 2023, about 2 years ago

Follow-up to #2409413: Remove fields that do nothing from the "RSS publishing" settings form β†’

Problem/Motivation

'title' is a special view mode hacked into the plugins. The default view mode 'rss' is provided by core but once you change the form you can never re-select. The teaser view mode might exist. The fulltext view mode almost certainly does not. I think we should fix all the view mode wonky-ness in another patch as it is likely to be hard. Basically, the whole view mode setting is currently very broken :(

    $form['feed_view_mode'] = array(
      '#type' => 'select',
      '#title' => t('Feed content'),
      '#default_value' => $this->config('system.rss')->get('items.view_mode'),
      '#options' => array(
        'title' => t('Titles only'),
        'teaser' => t('Titles plus teaser'),
        'fulltext' => t('Full text'),
      ),
      '#description' => t('Global setting for the default display of content items in each feed.')
    );

And the default value is RSS :(

Oh and the views are missing dependencies on the correct view mode if the default system view mode is used. What a mess.

Proposed resolution

Remaining tasks

User interface changes

API changes

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
SystemΒ  β†’

Last updated about 2 hours ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • 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

Merge Requests

Comments & Activities

Not all content is available!

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

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • First commit to issue fork.
  • Merge request !11849Resolve #2601030 "Views rss view" β†’ (Open) created by bbrala
  • Pipeline finished with Failed
    2 days ago
    Total: 190s
    #474677
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    Pushed to a MR with some small changes.

    Upgrade path is tested afaik, so removing that tag. Has tests it seems, so removing that tag also. Did small update to IS, but don't see how we can make this more clear.

    This will need a CR though. Dont think we need to deprecate anything really, since this is pretty much broken functionality you cant rely on.

  • Pipeline finished with Success
    2 days ago
    Total: 927s
    #474679
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    Added a change record.

    All tests are green. Which is great.

    Not sure about the upgrade path. I'll ask around

  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Any existing views that have default as the RSS view mode need to be updated so they store whatever the default value actually was, before we delete that value from config.

  • Pipeline finished with Failed
    2 days ago
    Total: 179s
    #475437
  • Pipeline finished with Canceled
    2 days ago
    Total: 212s
    #475445
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    Well, seems i have a working test. While going through the motions i did find a one more view that use default still.

    views.view.taxonomy_term.yml

          row:
            type: node_rss
            options:
              relationship: none
              view_mode: default
    

    Also a little confused. If i look at system.rss.yml the default should be rss i think, since that was in the config. But when running the update test it gets set to title, i really don't understand how that is possible. What am i missing there?

  • Pipeline finished with Failed
    2 days ago
    Total: 623s
    #475450
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    fixed tests, so setting to NR

  • Pipeline finished with Success
    1 day ago
    Total: 737s
    #475790
  • πŸ‡¬πŸ‡§United Kingdom catch

    Left a couple of (reasonably horrible) questions on the MR.

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Responded to @catch's review, NW for these changes.

  • Pipeline finished with Failed
    1 day ago
    Total: 130s
    #475996
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    I've got some questions about your approach, there might be more gotcha's (and possibly a bug :P)

  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands
  • Pipeline finished with Failed
    about 7 hours ago
    Total: 151s
    #476612
  • Pipeline finished with Failed
    about 7 hours ago
    Total: 176s
    #476616
  • Pipeline finished with Success
    about 7 hours ago
    Total: 578s
    #476619
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    Still need to handle 2 things:

    1. When default is the viewmode, and we have no config this will keep updateing to the first key. Oops.
    2. Run this noSave
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    Now running on onSave in the updateAll method.

    Also added an extra check for when we have no reference from system.rss and there is an available view_mode called default.

  • Pipeline finished with Canceled
    about 6 hours ago
    Total: 238s
    #476645
  • Pipeline finished with Failed
    about 6 hours ago
    Total: 537s
    #476647
Production build 0.71.5 2024