Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After #1497374: Switch from Field-based storage to Entity-based storage, field names don't have to be unique across entity types.
No need to prefix the 'block_body' field to differentiate it from node 'body' anymore...
Comment | File | Size | Author |
---|---|---|---|
#9 | 2083721-block_body-rename-9.patch | 10.22 KB | longwave |
#2 | renamed-block-body-field-2083721-1.patch | 10.45 KB | benjy |
Comments
Comment #1
yched CreditAttribution: yched commentedSame for the label, could be just 'Body' ? (well, not that we had constraints on label like we had on field name so far...)
Comment #2
benjy CreditAttribution: benjy commentedI just did a find and replace, see what the bot thinks
Comment #3
dsnopekIt looks like the patch in #2 changes a pre-existing update function:
block_update_8008()
. Shouldn't it instead add a new update function which renames 'block_body' to 'body'? That way people who already migrated through 8008 will get the update too. I don't really know the policy on this for core development, though, so that's an actual question. :-)Comment #4
yched CreditAttribution: yched commentedthanks @dsnopek!
No, we don't support HEAD to HEAD updates while we're still in alpha phase.
Would need an approval from the "Block API" folks, but this looks good to me.
Comment #5
larowlan+1 from me
Comment #6
yched CreditAttribution: yched commented#2: renamed-block-body-field-2083721-1.patch queued for re-testing.
Comment #7
yched CreditAttribution: yched commentedAs per #5, the maintainer of custom_block.module approves, so this is RTBC if it still passes tests.
Comment #9
longwaveRerolled.
Comment #10
yched CreditAttribution: yched commentedThanks! RTBC if green.
Comment #11
alexpottCommitted af6cd3d and pushed to 8.x. Thanks!
Comment #12
effulgentsia CreditAttribution: effulgentsia commentedGreat! @yched: should we do the same for comment_body?
Comment #13
larowlancomment_body would require an upgrade path as its an existing field in D7, so perhaps not worth the hassle?
Comment #14
yched CreditAttribution: yched commented+1 on renaming comment_body as well, but yes, the upgrade path is not going to be trivial...
Comment #15
swentel CreditAttribution: swentel commentedCan't we more or less ignore that now ? Or is this even going to be hard with migrate ?
Comment #16
yched CreditAttribution: yched commentedNot sure what are the current practices for stuff that "would need an upgrade" while migrate is being figured out.
The upgrade here would mean:
- changing the field name in field and instance CMI records
- updating entity displays
- renaming db tables & columns
- D7 views are not strictly our problem, but would end up broken
Comment #17
larowlanIn terms of an upgrade path, is there any reason we couldn't leave the old fields marked as comment_body but create any new ones as body?
The places where the field name is referenced in core (other than tests)
rdf.module
standard profile's comment rdf mapping
recent comments view
comment tokens
comment admin page (although this is wrapped in a check to see if it exists first so irrelevant and only used for the truncated title attribute)
comment manager - but this is for creating the field so would update.
Of those I think the tokens, rdf module and recent comments view are troublesome. But do they warrant an upgrade path?