- Issue created by @flyke
- πΊπΈUnited States Tim Bozeman
Hmm.. Is there a config for that block that is named
core.entity_view_display.block_content.YOUR_BLOCK_TYPE.default.yml
? That's what_toolbar_plus_get_view_mode
should fall back to. - π§πͺBelgium flyke
You are correct, there is no config for the display of this block, there is no core.entity_view_display.block_content.starterkit_horizontal_line.default.yml
So the question is, do we modify toolbar_plus to fallback to 'default' if it cant get the config, or is 'illegal' and should it be impossible to have blocks without a display setting ? On our end, we could programmatically create a custom 'hr' field, add that to the Manage display of the block type and then I think the error would be solved.
Steps to reproduce:
- Visit admin/structure/block-content/add
- Give the new block type a label
- save it, dont add fields, dont change 'Manage display'
- add this block on a layoutbuilder page
- visit the pageThis will result in an error. Is that what we want, so every developer is forced to have a display config of each block type ? Or should toolbar_plus handle this gracefully, by changing toolbar_plus.module line 97 into:
$cached_view_modes[$original_id] = $view_display ? $view_display->getMode() : 'default';
for example ? -
tim bozeman β
committed 34a998f4 on 1.0.x
Issue #3479370 by flyke, tim bozeman: Call to a member function getMode...
-
tim bozeman β
committed 34a998f4 on 1.0.x
-
tim bozeman β
committed 6dc8fbde on 1.0.x
Issue #3479370 by flyke, tim bozeman: Call to a member function getMode...
-
tim bozeman β
committed 6dc8fbde on 1.0.x
-
tim bozeman β
committed d769151f on 1.0.x
Issue #3479370 by flyke, tim bozeman: Call to a member function getMode...
-
tim bozeman β
committed d769151f on 1.0.x
- πΊπΈUnited States Tim Bozeman
Hmm, I'm not able to reproduce that error on Umami π€
Let's just add that change and see how it goes.