[PP-1] Deprecate and remove `status` and `info` settings from `block_content` blocks

Created on 7 March 2024, 4 months ago

Problem/Motivation

It was discovered in #3379725-5: Make Block config entities fully validatable β†’ that the config schema for Block config entities (type: block.block.*), and specifically the "base settings" for block plugins (type: block_settings) contains three key-value pairs (status, info and view) that actually are block_content block-specific. And … two of them are completely unused: status and info.

Ah, I finally found the explanation for why status, info and view_mode are part of the generic type: block_settings (and hence apply to ALL block plugins!).

The answer: it's simply an oversight that occurred in #2274175: Block plugin schema should be defined separately from the entity β†’ . πŸ˜„πŸ‘ (\Drupal\block_content\Plugin\Block\BlockContentBlock landed >1 year earlier, but the tight coupling only was removed ~6 months earlier, in #1927608: Remove the tight coupling between Block Plugins and Block Entities β†’ . Arguably at least there this should've been rectified, but that was at the height of the "we must get D8 done yesterday!" era, so it totally makes sense.)

So this issue has the potential to clean up some very old technical debt, that's caused confusion for every person who has ever looked at the exported YAML for blocks! πŸš€

Therefore null never makes sense, and it's only thanks to PHP's automatic typecasting that this has never been a problem πŸ˜…

Steps to reproduce

N/A

Proposed resolution

  1. βœ… Remove the status and info settings from the \Drupal\block_content\Plugin\Block\BlockContentBlock block plugin.
  2. βœ… Remove the status and info settings from all Block config entities using the above block plugin.
  3. Provide an update path that removes those two settings from existing blocks.

Remaining tasks

See above.

User interface changes

None.

API changes

None.

Data model changes

No more useless status and info settings on "content block" blocks.

Release notes snippet

None.

πŸ“Œ Task
Status

Postponed

Version

11.0 πŸ”₯

Component
Block contentΒ  β†’

Last updated 5 days ago

Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Wim Leers
  • Pipeline finished with Failed
    4 months ago
    Total: 537s
    #113655
  • Status changed to Postponed 4 months ago
  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Even though we could easily land this before πŸ“Œ Fix Block config entity type config schema violations: weight, property Postponed , I think it's better not to.

    Because #3379725 will bring much needed-clarity: that status and info belong in type: block.settings.block_content:*, instead of in type: block_settings (that's where they currently reside).

  • Pipeline finished with Failed
    4 months ago
    Total: 495s
    #113679
  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Because #3379725 will bring much needed-clarity: that status and info belong in type: block.settings.block_content:*, instead of in type: block_settings (that's where they currently reside).

    The changes in #3379725 will also cause most (I actually think all) test failures on the current MR to disappear. That's another important reason to postpone this issue: if we wait for that to land, then this issue's MR can stay as simple as it is today!

Production build 0.69.0 2024