Problem/Motivation
In core/modules/block/templates/block.html.twig
(and the overriden ones in Classy and Bartik as well), there is the following variable documentation:
* - block - The full block entity.
* - label_hidden: The hidden block title value if the block was
* configured to hide the title ('label' is empty in this case).
* - module: The module that generated the block.
* - delta: An ID for the block, unique within each module.
* - region: The block region embedding the current block.
Since #1989568: Remove block config ID from being used as an HTML ID or template suggestion that variable, however, does not exist anymore (see BlockViewBuilder::buildBlock() for proof).
Proposed resolution
Remove the documentation.
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Create a patch | Novice | Instructions | Yes |
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards | Novice | Instructions | Yes |
User interface changes
None
API changes
None
Data model changes
None
Beta phase evaluation
Issue category | Bug because people following the documentation will produce broken templates |
---|---|
Issue priority | In terms of themer's experience this is pretty major, because this is a heavily used template, and people are used to having e.g. a node variable in node.html.twig . In the grand scheme of things, I guess this just qualifies for "normal", though, I presume |
Unfrozen changes | Unfrozen because it only changes documentation |
Prioritized changes | Prioritized because it is a bug. |
Comment | File | Size | Author |
---|---|---|---|
#6 | 2546754-6.patch | 5.82 KB | sdstyles |
#4 | 2546754-4.patch | 947 bytes | joshi.rohit100 |
Comments
Comment #2
tstoecklerComment #3
tstoecklerComment #4
joshi.rohit100Comment #5
tstoecklerYay, thanks! A bunch of other files, have this too, though:
- core/modules/system/templates/block--system-menu-block.html.twig
- core/themes/bartik/templates/block.html.twig
- core/themes/classy/templates/block/block.html.twig
- core/themes/classy/templates/block/block--search-form-block.html.twig
- core/themes/classy/templates/block/block--system-menu-block.html.twig
Comment #6
sdstyles CreditAttribution: sdstyles at FFW commentedHi @tstoeckler I removed unused documentation from all above templates.
Comment #7
sdstyles CreditAttribution: sdstyles at FFW commentedComment #8
tstoecklerAwesome, thanks a lot!
Comment #9
Wim LeersNice clean-up!
Comment #10
tstoecklerComment #11
alexpottCommitted 0ba2b18 and pushed to 8.0.x. Thanks!