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

Issue fork drupal-3174990

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andypost created an issue. See original summary.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

joachim’s picture

> 2) not rendering the block when view missing

I think the admin user should be warned that they have a block that does nothing!

Possibly:

- Don't show the block as available to add if the 'internal:/rss.xml' path does not exist
- When adding the block, make the block config dependent on whichever view currently supplies the internal:/rss.xml path

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

acbramley made their first commit to this issue’s fork.

acbramley’s picture

Status: Active » Needs work

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.

acbramley’s picture

Status: Needs work » Closed (outdated)

Let's deprecate the whole thing #3518990: Deprecate SyndicateBlock