- Issue created by @codechefmarc
- Status changed to Closed: duplicate
almost 2 years ago 8:35am 23 March 2023 - π«π·France vbouchet
Hi @codechefmarc,
Thanks for reporting. I think it is fixed now with https://www.drupal.org/project/layout_builder_browser/issues/3228122 π Provider Category for Entities get mixed into one category Fixed . I am closing the ticket but feel free to reopen if it is still an issue (please note that it is for now on the -dev version only, I have not released a new version yet).
- πΊπΈUnited States codechefmarc
Hi @vbouchet, thanks for the quick response! I just checked with version 1.5 and I am seeing a lot more choices in the "Provider" dropdown, but I still can't see the core title block when I select "core". When I have some time soon, I'll see if I can look into why that is happening, but wanted to let you know.
- π«π·France vbouchet
Hi @codechefmarc,
I am reopening the issue. I though the "Title ()" block was the block you were talking about but I realize when checking at the block layout that there is a simple "Page title" option in the core provider.
- Status changed to Needs review
over 1 year ago 7:19pm 26 April 2023 - πΊπΈUnited States kevinquillen
This looks like it is because of Layout Builder itself. The code in question:
/** * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). */ function layout_builder_plugin_filter_block__layout_builder_alter(array &$definitions, array $extra) { unset($definitions['system_main_block']); // @todo Restore the page title block in https://www.drupal.org/node/2938129. unset($definitions['page_title_block']); }
Issue: π PageTitle block is non-functional when not handled directly by \Drupal\block\Plugin\DisplayVariant\BlockPageVariant Postponed
- Status changed to Needs work
over 1 year ago 1:18pm 2 May 2023 - π«π·France vbouchet
Hi @kevinquillen,
I did not found that specific code when I checked some weeks ago but I found a similar code where the main_block is explicitly added to the list of blocks (not exactly sure in which context). I concluded that we have to do the same in Layout Builder Browser to list it down.
- π«π·France vbouchet
Not sure I will have a lot of time in the next week to focus on this so reporting my latest tests.
In the BlockForm.php around line 73 (the code responsible for the form when clicking the "Add block" button to associate a block with a category) and BrowserController.php around line 144 (the code responsible for displaying the browser), I added the "Page title" block into the definitions list:
$definitions['page_title_block'] = $this->blockManager->getDefinition('page_title_block');
I was able to create a block using the "Page title" core block in a category. I was able to place a "Page title" block in a section. However, the block was not rendering the expected content. I am using the default Olivero theme on my dev instance. The "Page title" block placed using the Block layout (admin > structure > block layout) displays the page title + the star to add the page to the personal shortcut menu. Adding the "Page title" block in the section only shows the star.
I was expecting that adding the block definition would be enough. Need to dive to understand why it is not the case.