Problem/Motivation
On a fresh install of Drupal, when no custom blocks have been added, the "no results" text on the Custom Block Library page (/admin/structure/block/block-content
) reads
There are no custom blocks available.Add a custom block.
There is no space between the two sentences.
Proposed resolution
The Custom Block Library page is created by a view, defined by core/modules/block_content/config/optional/views.view.block_content.yml
. That view defines two "no results" items. The first is a text area, and the second uses the views plugin defined at core/modules/block_content/src/Plugin/views/area/ListingEmpty.php
. The source of the problem is that these two pieces are pasted together with no space in between.
There are a few possible solutions:
- Add a space to the end of the text area.
- Add a third "no results" item in between the existing two, with just a space.
- Remove the first item and add the text, with a space, to the views plugin.
- Add a space at the beginning of the views plugin.
I suppose that neither of the last two options is viable, since it is possible that some sites will have views that use the views plugin.
The first solution is the easiest. Let's start there and see if anyone complains about it.
Do we need an update function? I am willing to skip that, since it will only matter on existing sites that do not have any custom blocks, where someone bothers to look at this page. I am sure there will be some such sites, but not enough that I care about it.
Workarounds
A site owner can edit the view at /admin/structure/views/view/block_content
and add a space to the first item under "No results behavior". This should work with or without the patch.
The same thing can be done using the configuration system: see Comment #3.
Remaining tasks
User interface changes
This will change the interface text on /admin/structure/block/block-content
.
API changes
None
Data model changes
None