Test that SyndicateBlock works when views disabled

Created on 5 October 2020, over 4 years ago
Updated 20 March 2025, about 1 month ago

Problem/Motivation

Follow-up to #3048848-18: Syndicate block outputs wrong feed URL

frontpage view could change URL for RSS feed but \Drupal\node\Plugin\Block\SyndicateBlock expects that URL always rss.xml

Steps to reproduce

See build() method https://git.drupalcode.org/project/drupal/-/blob/9.0.x/core/modules/node...

Proposed resolution

1) add check the view exists and retrieve feed URL from the view
2) not rendering the block when view missing
3) discuss to add setting for URL

Remaining tasks

agree on implementation
patch/commit

User interface changes

TBD

API changes

no

Data model changes

no

Release notes snippet

no

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

node system

Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
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.

  • First commit to issue fork.
  • Merge request !11547Issue #3174990: Use views url directly → (Open) created by acbramley
  • 🇦🇺Australia acbramley

    So we can do something like this (in MR) to use the views URL directly so changing the path won't break the block, but this block has several other issues which I'm not even sure if it's worth fixing (does anyone use this block??)

    1. Has a block_count config which does nothing. This will need an update path to remove the config, etc.
    2. Config dependencies - the block should depend on the view
    3. Access controls - The block shouldn't render if the view or display doesn't exist - what happens if someone renames the display from feed_1? Should we just hide the block in those cases?
    4. Cacheability - the block render cache needs to depend on the views config.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 637s
    #452810
  • 🇦🇺Australia acbramley

    Let's deprecate the whole thing 📌 Deprecate SyndicateBlock Active

Production build 0.71.5 2024