Failed to load resource: the server responded with a status of 403 (Forbidden)

Created on 5 October 2023, about 1 year ago

Problem/Motivation

I have done a few installs both 11.10.2 and 12.0.0-alpha and both installs I get the same results.
I get this error message "Failed to load resource: the server responded with a status of 403 (Forbidden)"
when loading a page that contains profile images or any topic images.

Steps to reproduce

Install open social and set private files in settings.
Install extra open social modules
Set site name and regionals settings

When the home page loads the first time you will get error messages in the browser console.

1. Default profile image is not found.
But the default profile image does exist in the private files directory under files/private/default_images
See this issue https://www.drupal.org/project/social/issues/3316153 β†’ and this issue https://www.drupal.org/project/social/issues/2978581 β†’

I did the core image patch as suggested but that does not fix the issue.
https://www.drupal.org/project/drupal/issues/2107455 πŸ› Image field default value not shown when upload destination set to private file storage Needs work
No files are set in the files/styles during installation.

2. Post images work

After a fresh install on the home page post something and add an image.
After upload the image is not displayed and I get the error "Failed to load resource: the server responded with a status of 403 (Forbidden)"
After save of the post the image is shown on the front page.
The following folders are created inside my private folder
files/private/posts
files/private/styles/social_post_photo/private/post

3. Topic and event images does not work at all
If I create a topic an load a topic image the crop and thumbnail images give the following error.
"GET http://opensocial/system/files/styles/crop_thumbnail/private/2023-10/ima... 403 (Forbidden)"
The folder files/private/2023-10 is created and the original image is uploaded but no styles are generated in files/styles or files/private /styles

The error log:

Path: /system/files/styles/social_medium/private/2023-10/image.png.webp?itok=RZqZzRdq. Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: in Drupal\image\Controller\ImageStyleDownloadController->deliver() (line 197 of \core\modules\image\src\Controller\ImageStyleDownloadController.php).

During all my teste not a single folder was created under files/styles

Is there something wrong with my server setup?
php: 8.1.13
MySQL: 8.0.31

Or must this core issue be addressed: https://www.drupal.org/project/drupal/issues/2107455 πŸ› Image field default value not shown when upload destination set to private file storage Needs work

πŸ’¬ Support request
Status

Active

Version

12.0

Component

Installation

Created by

πŸ‡ΏπŸ‡¦South Africa vlooi vlerke

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

Comments & Activities

Production build 0.71.5 2024