Drupal in sub directory not supported

Created on 22 June 2015, almost 10 years ago
Updated 4 March 2025, about 1 month ago

If Drupal is located in a directory and not in the wwwroot, links are not added correctly.
P.ex, if your Drupal instance is running in www.myserver.com/mydir links to the favicons won't be added because:

  1. responsive_favicons_normalise_path() will add the basepath to the image url. This IS the right url to be printed on the header link.
  2. responsive_favicons_validate_tags() composes the image url as DRUPAL_ROOT . $file_path , and both of them contain the basepath. This results in the link going to the $missing array since it gets an invalid url (www.myserver.com/mydir/mydir/path_to_image instead of www.myserver.com/mydir/path_to_image). Instead of that, the existence and readability of the image should be checked against DRUPAL_ROOT . str_replace($base_path, '/', $file_path)

I have that solution working on my Drupal instance, but I'm afraid I'm so new to drupal coding that I can't provide a valid patch :(

🐛 Bug report
Status

Needs review

Version

1.2

Component

Code

Created by

🇪🇸Spain jlafu

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024