- πΊπΈUnited States dcam
I've been trying to understand the nature of this issue because it didn't make sense that blocks would be missing a title. And I didn't know how this related to a D7 migration. It started to sound more like a feature request to make block titles the same as the feed name. But I think that I figured out what the root cause of this issue is: In D7 the block title was the feed title. See https://git.drupalcode.org/project/drupal/-/blob/7.x/modules/aggregator/.... But in D8 Aggregator blocks in D8+ got a title of "Aggregator feed." So from the perception of a person migrating a D7 site, they might describe the block title as being "missing" as in "it lost the title at it had in D7."
Back in 2013 when Aggregator blocks were derivatives, the derivatives did have the feed title as the block title. But then #1888702: Use configuration selection instead of derivatives for some blocks β happened and the derivatives were eliminated in favor of having the feed selector setting. The feed-block titles were deleted along with them. I read through the issue to see if there was any consideration to that, but there wasn't. There was no test coverage. So this is a feature regression.
We definitely can't implement the existing patch as it is. I just tested it. I placed a block with the default "Aggregator feed" title. Then I applied the patch. The rendered block title didn't change, but when I went into the block's config form the title field contained the feed title.
So this is not desirable behavior. Oddly enough, I tested changing the block title to something else and and it changed on the front end. But when I went back into the config form again the field reverted to the feed title.Personally, I don't think that any change should be made to the current behavior for blocks being placed in D9/10. I don't know that it makes any sense because you configure which feed is displayed at the same time that you set the title. So I say we forget the current patch. But maybe we need to set the titles of blocks that are migrated, if that's possible.
- Status changed to Active
over 1 year ago 2:36am 28 August 2023 - πΊπΈUnited States dcam
Nope. I was wrong. The block titles are literally empty after being migrated from D7. I think the problem is that in D7 the block title was set or altered by Aggregator to be the feed title. That doesn't happen in D8+. It just ends up having no H2. I haven't checked D6 yet.
On the surface this seems like an easy fix. We need to alter the migration and set the block label to the feed title. I just have to find out how to query for it.
- Status changed to Needs review
over 1 year ago 5:01am 29 August 2023 - last update
over 1 year ago 146 pass, 4 fail - πΊπΈUnited States dcam
I added hook_migrate_prepare_row() in order to alter the block's label as it's being migrated.
I copied the D6 block migration test for D7. The Aggregator feed block had to be enabled in the fixture.
The last submitted patch, 20: 2927014-20.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- last update
over 1 year ago 146 pass, 4 fail - πΊπΈUnited States dcam
I accidentally included changes from another patch. I don't think this will fix the failures though.
The last submitted patch, 22: 2927014-22.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- last update
over 1 year ago 148 pass - Status changed to RTBC
over 1 year ago 3:09am 7 September 2023 - last update
over 1 year ago 148 pass - Status changed to Fixed
over 1 year ago 3:47am 7 September 2023 - πΊπΈUnited States dcam
Thank you to everyone who helped work on this patch!
Automatically closed - issue fixed for 2 weeks with no activity.