Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
theme system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2012 at 01:37 UTC
Updated:
5 Mar 2021 at 17:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
naxoc commentedUrls starting with a slash are relative to the root of the running script. What drupal is looking for in case of the logo path is the "absolute" path from the root. Maybe the description under the textfield where the path is input should simply mention "dont start the path with a slash"
Comment #2
Anonymous (not verified) commentedHere's a quick patch to update the description. I mimicked the description from the file system admin area to maintain consistency.
Comment #3
Anonymous (not verified) commentedComment #4
Rchenko commentedHi, I just updated to drupal 7.24 and got this bug. I tried this patch and it did not work. Any ideas?
I did not use git because that is another whole can of worms. I simply replaced this line:
'#description' => t('The path to the file you would like to use as your logo file instead of the default logo.'),
with this line:
'#description' => t('The path to the file you would like to use as your logo file instead of the default logo. This path must be relative to the Drupal installation directory and be accessible over the web.'),
in the code. I know that this is not the "best" way to do this but I just want to move on with my life. Any insight would be much appreciated!
Comment #5
royal121 commentedI have added an example in the description. Here is the patch.
Comment #6
royal121 commentedEdited a bit of formatting.
Comment #7
mimes commentedPatch posted in comment #6 is usable.
Comment #8
bill.zero commentedSorry to bring this up after 5 years, but the problem ID'd in the issue title is still at play as of drupal 7.60.
The previous comments on this issue have addressed it as a documentation issue rather than a path issue. I disagree. If, as previous commenters have stated, the field expects a path relative to the drupal root (and therefore an initial slash is not necessary), then my "Page not found" errors log would not be littered with entries like ...
[relative.path]/[path/and.file.name.of.custom.icon.png]
... with the [relative.path] being whatever relative url the user clicked into when my custom icon tried to load.
If the expectation is that the field expects a path relative to the root, it should act like that and stop prepending other relative paths in front of it. Alternatively, the field should allow an initial slash so that the server knows to work from the web root.
Comment #9
bill.zero commentedComment #10
bill.zero commentedIf it matters, I'm using the Zen 7.x-5.6 theme.
Comment #12
bill.zero commentedWorkround: I'm using a RedirectMatch in my .htaccess to try to keep the "page not found" errors out of the log:
RedirectMatch 301 .*iconfilename.png https://example.com/directoryname/iconfilename.pngIt seems to be working. I'm not great with regex.