Inline images are not displaying in social footer block

Created on 6 September 2023, over 1 year ago
Updated 18 September 2023, over 1 year ago

Problem/Motivation

When inserting an inline image in social footer block via the admin/config/opensocial/footer-block settings page, the image is not rendered after hitting the save button. The DOM element is there but the URL to the image is broken for other users (it works for the one that saved the form and uploaded the image).

The reason for this is that by default CKEditor will save inline images in the private directory, this ties the image to be only viewed/accessed by users who created this private image or have access to the entity that this image is attached to, since this form is not tied to any entity but rather its a custom implementation it means that only user who uploaded the inline image will have access to it.

Steps to reproduce

1. Log in as user 1.
2. Go to admin/config/opensocial/footer-block and upload an image via the CKEditor.
3. Save the form
4. Log in as different user and check the footer block if the image is displaying correctly.

Proposed resolution

Implement a hook_file_download() in social_footer module that allows access to private images used within the text field of the social footer block settings.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

11.10

Component

Code (back-end)

Created by

🇸🇮Slovenia nkoporec Slovenia

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

Comments & Activities

Production build 0.71.5 2024