Uploading an image in Layout Builder does not show the image.
This may be the same thing as Enabling private files breaks your site β .
I've created a content type called Outside Page intended to be used with a custom theme that is outside of the OS universe. I've enabled Layout Builder. When I edit a Layout Builder section with CKEditor and upload an image, the file goes to the private file system.
For an "inside page," this is correct behavior if the node is part of a group and the image must remain protected by the private file system. However, for an "outside page," the result is that the image doesn't appear to an anonymous user.
Some code for further explanation:
This file identifies the basic and full editor text formats as some that should be private.
profiles/contrib/social/modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php:
public function getTextEditorsToProtect() {
$config_names = [
'editor.editor.basic_html',
'editor.editor.full_html',
];
return $config_names;
Because $names comes across as editor.editor.full_html, it matches the array and the location is set to private.
public function loadOverrides($names) {
$overrides = [];
if (PrivateStream::basePath()) {
$config_names = $this->getTextEditorsToProtect();
foreach ($config_names as $config_name) {
if (in_array($config_name, $names)) {
$scheme = $this->configFactory
->getEditable($config_name)
->get('image_upload.scheme');
if ($scheme == 'public') {
$overrides[$config_name]['image_upload']['scheme'] = 'private';
One way to get around this is to create a new text format, such as "Full HTML (outside)", that will not get caught by the logic above. This seems to be working for me.
It seems that two things need to happen:
Closed: outdated
10.0
Code (back-end)
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.