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
Remove the rss viewmode setting from core and provide a path to migrate sites away from this.
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #56 | 2601030-nr-bot.txt | 91 bytes | needs-review-queue-bot |
| #54 | 2601030-nr-bot.txt | 91 bytes | needs-review-queue-bot |
Issue fork drupal-2601030
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:
- 2601030-views-rss-view
changes, plain diff MR !11849
Comments
Comment #2
alexpottHere's a firs cut... upgrade path for views still to think about and test.
Comment #3
alexpottAnother problem here is the hard coding of the title view mode - this is not a reserved word so a user could add a view mode called title and things would start to behave interestingly.
Comment #5
alexpottNew patch handles the potential title view mode clash.
Comment #7
alexpottFixing the fails. Also another reason why default is a bad name for the pseudo view modes configured by system.rss - the default view mode is provided by standard...
Comment #8
alexpottComment #11
dawehnerMoving out of base system.
This underscore feels a little bit odd, given that nothing seems to be using it?
Comment #12
xjmI don't understand this issue from the summary. Some STR might help, as it currently reads as though it's removing an important feature. The summary should also document the case for making this change during RC and what the impacts/disruptions are. Thanks!
Comment #13
catchUpdating the title for now.
Comment #14
xjmComment #23
longwaveRerolled following #2409413: Remove fields that do nothing from the "RSS publishing" settings form, but this still needs an upgrade path and tests. We can remove the entire RSS publishing config form now.
Comment #25
longwaveAdded post_update hook to delete the config entirely. Not sure what we should do about the pre-existing system_post_update_delete_rss_settings(), if anything.
Comment #27
longwaveAdded a test and fixed the other update tests by removing the previous post_update hook code.
Still needs an upgrade path.
Comment #31
anybodyComment #33
needs-review-queue-bot commentedThe 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.
Comment #35
wim leersThis blocks #3422904: Add validation constraints to all system.* simple config (except system.rss) and #2952037: [meta] Add constraints to all simple configuration.
Comment #38
bbralaPushed 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.
Comment #39
bbralaAdded a change record.
All tests are green. Which is great.
Not sure about the upgrade path. I'll ask around
Comment #40
bbralaComment #41
longwaveAny existing views that have
defaultas the RSS view mode need to be updated so they store whatever the default value actually was, before we delete that value from config. The default value is likely broken in many cases but doing this won't make it any more broken nor will it break existing sites that by coincidence do have it working for some reason, e.g if the default isteaserand they do have a teaser view mode.Comment #42
bbralaLittle more context; https://drupal.slack.com/archives/C079NQPQUEN/p1744791038514039
Comment #43
bbralaWell, 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
Also a little confused. If i look at
system.rss.ymlthe default should berssi think, since that was in the config. But when running the update test it gets set totitle, i really don't understand how that is possible. What am i missing there?Comment #44
bbralafixed tests, so setting to NR
Comment #45
catchLeft a couple of (reasonably horrible) questions on the MR.
Comment #46
longwaveResponded to @catch's review, NW for these changes.
Comment #47
bbralaI've got some questions about your approach, there might be more gotcha's (and possibly a bug :P)
Comment #48
bbralaComment #49
bbralaStill need to handle 2 things:
Comment #50
bbralaNow 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.
Comment #51
bbralaMade selection code better and added comments on how it works.
Getting a failure on the Configuration tests. But not sure why, perhaps because the fixtures need to change since default config changed for taxonomy config?
Comment #52
mstrelan commentedOpened #3522801: Deprecate RSS usage in core to discuss if we want to deprecate RSS more broadly in core
Comment #53
longwaveFixed a typo in the comments but otherwise this looks great, thanks for working through the pain of the update hooks and adding the test coverage for that - glad to see the back of this finally.
Comment #54
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #55
bbralaBot is broken
Comment #56
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #57
longwaveGitLab also says there is a merge conflict?
Comment #58
bbralaOh, will rebase later today.
Comment #59
bbralaComment #60
alexpottWe have two modules that will need issues against when we remove system.rss. https://www.drupal.org/project/knowledge and https://www.drupal.org/project/support - the Knowledge project is the only one with a stable release against 11.x ... some other modules will require updating but it is
The change record needs to be updated to explicit mention that system.rss is going away and what modules should do to replace it. Setting to needs work to address this. Once done can be rtbc'd again.
Comment #61
alexpottSearch link that found the modules that need fixes... http://codcontrib.hank.vps-private.net/search?text=system.rss&filename=
Comment #62
bbralaI normally search like this: https://git.drupalcode.org/search?group_id=2&scope=blobs&search=-path%3A...
Since when are we opening issues on contrib projects for deprecations/removal? I've not seen that before :)
Comment #63
bbralaUpdated CR
Comment #64
bbralaMis understood, RTBC was referring to the change record.
But still made 2 child issues for those modules.
Comment #65
alexpottMissing docs...
I keep on pondering whether we should decouple the config removal from the other changes here. Like decouple views RSS and make the system config completely unused and deprecated and then remove that in a separate 12.x issue. I would mean that we also have the previous value around for module updates.
Not sure - going to ping @catch and @longwave for thoughts.
Comment #66
bbralaAdded the requested docs.
Comment #67
bbralahttps://drupal.slack.com/archives/C079NQPQUEN/p1747131446995239 slack thread
Comment #68
bbralaGonna try again.
Failures were just blips. Setting back to RTBC
Comment #69
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #71
bbralaRebased and resolved the small conflicts. Also fixed phpunit annotation, those needed changing.
Comment #72
alexpottSo close... I think we need to change the update function a little bit to make sense when it is called several times as part of a batch.
Comment #73
bbralaImplemented the small fix by @alexpott
Setting to RTBC because fix is small
Comment #74
alexpottCommitted 90d56c4 and pushed to 11.x. Thanks!
Comment #77
bbralaYay! Thank you guys. This was a hard one :)