Warning from block components when enabling for global template

Created on 19 February 2025, about 1 month ago

Overview

Warning: Undefined array key "provider" in block_theme_suggestions_block() (line 79 of core/modules/block/block.module).

Proposed resolution

I think in πŸ“Œ Consider refactoring page_template into page_region(s) Active we may have missed something

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

Data model

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

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

Comments & Activities

  • Issue created by @larowlan
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    My page is also mangled (although that could be an 11.x issue)

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Also happens on 11.1.2

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    I'd have expected PHP Warnings to cause test failures 😳 But maybe this only gets triggered in E2E tests? We should expand cy.drupalUninstall() to verify there's no warning or error log entries, that'd catch this.

    Still, I wanted to reproduce manually. So I just did a fresh install of 0.x (dce53274decc5ae78eeeb3c6a0006d2f198453ca), and cannot reproduce. I'm on 11.1.1 and PHP 8.3.15.

    I even put a breakpoint on that particular line in block_theme_suggestions_block() and can observe the expected #configuration being present:

    What am I missing? πŸ™ˆ

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    I cannot reproduce this either

    I think my 'fresh install' included enabling navigation, layout builder and layout discovery but then uninstalling them.

    But skipping that step, can't reproduce.

    Putting this down to being under the weather.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    I can reliably reproduce this now.
    It requires turning on XB for global regions in olivero

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    The warning is coming from the \Drupal\experience_builder\Controller\ApiConfigControllers::list from entity type ID component

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia

    I'm not able to reproduce the block_theme_suggestions_block() warning.

    I do see the page mangling when I enable "Use Experience Builder for page templates in this theme." in Olivero's settings, especially the page title block getting all skinny like in the issue summary's screenshot. I think that's due to the extra <div> that XB is adding around regions that πŸ“Œ Implement HTML comment annotations for Regions, replace HTML wrappers Active aims to remove, so I think this issue is a duplicate of that one.

    When the checkbox above is not enabled, the markup around the <main> element is:

    <div class="main-content__container container">
      <main role="main" class="site-main">
    

    When the checkbox is enabled, that markup is:

    <div class="main-content__container container">
      <div class="sidebar-grid grid-full">
        <main role="main" class="site-main">
    

    In Chrome inspector, if I remove the classes from that middle div, it fixes the mangling of the page title.

Production build 0.71.5 2024