Display title setting has wrong schema type

Created on 3 August 2015, over 9 years ago
Updated 29 January 2024, 10 months ago

Problem/Motivation

"Display title" defines whether a block should display the block title or otherwise and is a single checkbox in Block module, as such boolean should be the proper data type in config.

Proposed resolution

Update block settings schema to use a boolean (TRUE/FALSE) rather than a string ('visible'/'hidden') to store display title value, update block config files to use boolean value instead of string values and finally an update hook to convert existing blocks to use boolean values rather than strings.

Remaining tasks

Update hook

User interface changes

N/A

API changes

N/A

Data model changes

core.data_types.schema.block_settings.mapping.label_display.type changed from string to boolean

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Configuration entity 

Last updated about 5 hours ago

Created by

🇩🇪Germany webflo

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
  • 🇬🇧United Kingdom ChrisDarke London

    Migrating Pittsburgh 2023 to Pittsburgh2023 tag for cleanup

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Build Successful
  • 🇮🇳India karishmaamin

    Tried re-rolling patch. Please review

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    Seems reroll caused failures. And should target 11.x

  • Status changed to Needs review over 1 year ago
  • last update over 1 year ago
    29,470 pass, 34 fail
  • 🇮🇳India sagarchauhan

    Added Reroll with respect to 11.x

  • 🇺🇸United States smustgrave

    Will let the tests finish but don't think the reroll was correct. Look at the file sizes. Almost tripled in size.

  • last update about 1 year ago
    Build Successful
  • 🇮🇳India vsujeetkumar Delhi

    @smustgrave, Added reroll patch against 11.x with respect of #26, As Bartik and Seven theme are not the part of D10, 11, So below configurations are not part of this reroll, Please have a look and advise If this is a correct one.

    core/profiles/standard/config/optional/block.block.bartik_account_menu.yml
    core/profiles/standard/config/optional/block.block.bartik_breadcrumbs.yml
    core/profiles/standard/config/optional/block.block.bartik_content.yml
    core/profiles/standard/config/optional/block.block.bartik_footer.yml
    core/profiles/standard/config/optional/block.block.bartik_help.yml
    core/profiles/standard/config/optional/block.block.bartik_main_menu.yml
    core/profiles/standard/config/optional/block.block.bartik_messages.yml
    core/profiles/standard/config/optional/block.block.bartik_powered.yml
    core/profiles/standard/config/optional/block.block.bartik_search.yml
    core/profiles/standard/config/optional/block.block.bartik_tools.yml
    core/profiles/standard/config/optional/block.block.seven_breadcrumbs.yml
    core/profiles/standard/config/optional/block.block.seven_content.yml
    core/profiles/standard/config/optional/block.block.seven_help.yml
    core/profiles/standard/config/optional/block.block.seven_messages.yml

  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States smustgrave

    Seemed to have failures.

  • First commit to issue fork.
  • last update about 1 year ago
    Build Successful
  • @welly opened merge request.
  • last update about 1 year ago
    Build Successful
  • Status changed to Needs review about 1 year ago
  • 🇬🇧United Kingdom welly

    Rerolled the patch - note that umami profile and olivero adds weight to this change as there's a number of additional block configs that required updating.

  • last update about 1 year ago
    Build Successful
  • last update about 1 year ago
    Custom Commands Failed
  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States smustgrave

    Hiding patches as work has switched to MR 4729 which is on 11.x

    Moving to NW for CC failure.

    Am confused as the patch sizes have shifted each patch. So not sure if things were being removed or added.

    Tagging for issue summary for what is being fixed.

  • 🇬🇧United Kingdom welly

    @smustgrave stuff is being added to the merge request. Turns out there are a LOT of tests and config for blocks, lots of which set the label_display, hence the merge request growing.

  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • @welly opened merge request.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • @welly opened merge request.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • @welly opened merge request.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open on Drupal.org →
    Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • last update about 1 year ago
    Custom Commands Failed
  • last update about 1 year ago
    Build Successful
  • 0:59
    24:36
    Running
  • 22:29
    0:55
    Running
  • 11:11
    43:45
    Running
  • last update about 1 year ago
    30,365 pass, 37 fail
  • last update about 1 year ago
    Custom Commands Failed
  • last update about 1 year ago
    30,366 pass, 36 fail
  • Pipeline finished with Failed
    about 1 year ago
    Total: 942s
    #35270
  • Status changed to Needs review about 1 year ago
  • 🇬🇧United Kingdom welly

    Sorry about the mess above! I'm still learning this new system.

    I've got most of this done now, but having a problem with some tests passing, which you can see here - https://git.drupalcode.org/issue/drupal-2544708/-/jobs/202425

    Would welcome some advice on how to get those tests passing. I believe it will be because the block config in the config tarball will have the old schema but not 100% sure how to update that.

    I'll put this into "needs review" so we can get some eyes on it but appreciate it's not quite ready!

  • last update about 1 year ago
    30,431 pass, 5 fail
  • 🇮🇳India vsujeetkumar Delhi

    Test fails because of 'type' issue, Try to fixed that.

  • Pipeline finished with Failed
    about 1 year ago
    #38076
  • 🇬🇧United Kingdom welly

    The changes you made to MessageViewBuilder.php and LayoutBuilderEntityViewDisplay.php I'm pretty certain are not correct although the other two ()help.post_update.php and MigrateBlockTest.php) look to have been missed. The failing tests are update tests which need a correct update hook - the one I added isn't quite correct. Will be looking at this on Friday and hopefully will be able to get this passing all tests! :-)

  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States smustgrave

    Seems there's still work to be done.

  • 🇮🇳India vsujeetkumar Delhi

    @welly As mentioned in #49, reverted the file changes for 'MessageViewBuilder.php' & 'LayoutBuilderEntityViewDisplay.php'. During the investigation last I have added those, but now its reverted and try to fix the remaining tests.

  • Pipeline finished with Failed
    about 1 year ago
    Total: 626s
    #43805
  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    Adding the configuration schema tag.

  • Pipeline finished with Failed
    12 months ago
    #51192
  • Pipeline finished with Failed
    12 months ago
    #51193
  • Pipeline finished with Failed
    12 months ago
    Total: 776s
    #51196
  • Pipeline finished with Failed
    12 months ago
    #51210
  • Pipeline finished with Failed
    12 months ago
    Total: 233s
    #51213
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
  • Pipeline finished with Failed
    12 months ago
    Total: 434319s
    #51214
  • Pipeline finished with Canceled
    12 months ago
    Total: 690s
    #53572
  • Pipeline finished with Failed
    12 months ago
    #53574
  • Pipeline finished with Failed
    12 months ago
    Total: 726s
    #53749
  • Pipeline finished with Canceled
    12 months ago
    Total: 7000s
    #53758
  • Pipeline finished with Failed
    12 months ago
    #53818
  • 🇬🇧United Kingdom welly

    Have hit a bit of a wall with these tests.

    Failed tests I'm coming up against are the following:

    1. https://git.drupalcode.org/issue/drupal-2544708/-/jobs/381558#L1695

    I'm struggling to see where the string type variable is coming from. When I put breakpoints into the code, I can see that the config value for core.entity_view_display.node.page.default:third_party_settings.layout_builder.sections.0.components.aeb0f8ae-7f1a-4d65-aaeb-c26ce56fa27d.configuration.label_display is set to "0". I just don't know where that is coming from.

    It doesn't seem to be here: https://git.drupalcode.org/issue/drupal-2544708/-/blob/2544708-display-t...

    2. https://git.drupalcode.org/issue/drupal-2544708/-/jobs/381558#L818

    This seems to be unrelated to my PR so again, struggling to see how this is failing. If I check

    core/tests/fixtures/config_install/multilingual.tar.gz there doesn't seem to be any deleted views configs so again, struggling to understand how this is failing.

    3. https://git.drupalcode.org/issue/drupal-2544708/-/jobs/381557

    All the tests are passing so not sure what the fail is here.

    ERROR: Job failed: pod "runner-tdd8nzs6-project-119803-concurrent-1-w67bvbwo" status is "Failed"

    And there are some failed tests in the Functional Javascript tests which I'll come back to as I've not looked at them too closely yet.

    So any advice would be much appreciated!

  • 🇬🇧United Kingdom welly

    Going to look at the modified fixtures and see if they need repairing....

  • Pipeline finished with Failed
    12 months ago
    Total: 686s
    #54305
  • Pipeline finished with Failed
    12 months ago
    Total: 5758s
    #54369
  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    Looks like there is still a failure in TimestampFormatterSettingsUpdateTest, but that is the only remaining failure, that should be fixed.

  • 🇬🇧United Kingdom welly

    So I've spent a bit of time trying to resolve this TimestampFormatterSettingsUpdateTest error without success. When that test runs, the runUpdate method call in testPostUpdateTimestampFormatter fails with the following assertion failures

    There should be no errors in configuration 'core.entity_view_display.node.page.default'. Errors:
    
    Schema key core.entity_view_display.node.page.default:third_party_settings.layout_builder.sections.0.components.b961467b-96b6-47da-baab-fec95554f963.configuration.label_display failed with: variable type is string but applied schema class is Drupal\Core\TypedData\Plugin\DataType\BooleanData
    Schema key core.entity_view_display.node.page.default:third_party_settings.layout_builder.sections.0.components.89467df8-8ca7-48a6-9f92-8292f125dd36.configuration.label_display failed with: variable type is string but applied schema class is Drupal\Core\TypedData\Plugin\DataType\BooleanData
    
    Failed asserting that Array &0 (
        'core.entity_view_display.node.page.default:third_party_settings.layout_builder.sections.0.components.b961467b-96b6-47da-baab-fec95554f963.configuration.label_display' => 'variable type is string but applied schema class is Drupal\Core\TypedData\Plugin\DataType\BooleanData'
        'core.entity_view_display.node.page.default:third_party_settings.layout_builder.sections.0.components.89467df8-8ca7-48a6-9f92-8292f125dd36.configuration.label_display' => 'variable type is string but applied schema class is Drupal\Core\TypedData\Plugin\DataType\BooleanData'
    ) is true.
     

    I've tried to debug where the config change is occurring that is inserting those two components but I've had absolutely no success. I'd like to get this issue over the line but this one has me stumped and I've hit a wall.

    Would appreciate any help with this one!

    Thank you

  • Pipeline finished with Failed
    10 months ago
    Total: 401s
    #84469
  • Pipeline finished with Failed
    10 months ago
    Total: 155s
    #84470
  • Pipeline finished with Failed
    10 months ago
    Total: 162s
    #84471
  • Pipeline finished with Failed
    10 months ago
    Total: 161s
    #84472
Production build 0.71.5 2024