Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
system.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Sep 2010 at 18:42 UTC
Updated:
29 Jul 2014 at 19:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
bobodrone commentedI found out that first of all it have not set the "file_public_path" (which set the current files directory in the variable table) when you install a clean Drupal 7 installation but most important of all the form where you upload the custom logo should return the filepath relative to default files folder instead of just the filename in the field where your logos filename is shown.
This patch solves this by prepend the "default files path" to the uploaded logo when it prints it to the custom logo field in the form.
Comment #2
bobodrone commentedchanged >>> 7.x-dev
Comment #3
bobodrone commentedand changed >>> system.module
Comment #5
bobodrone commentedRenamed my first core 7 patch, now I'm trying to follow the naming convention.
Sorry for that!
/ BoboDrone
Comment #6
mariusz.slonina commentedsub
Comment #7
bobodrone commentedI think this bug is pretty serious since all logos will disappear the second time you post the theme settings form of any reason (if not have set file_public_path before manually)
Therefore I change this to major.
/ Bobodrone
Comment #8
dixon_The Drupal 7 release party in Gothenburg by NodeOne will update, test and review this patch so we hopefully can mark this as RTBC tonight.
Comment #9
fabsor commentedHi!
The patch looks fine apart from that the trailing slash should not be in the default value, this way, the file public path is the same as in other places in core.
Comment #10
logaritmisk commentedI have tried the patch by fabsor and it works.
Comment #11
logaritmisk commentedOups, forgot to change status :/
Comment #12
dixon_Small offset. Re-rolled patch. Still works perfectly.
Comment #13
webchickI would really love to see us add a test for this so it doesn't end up happening again.
Comment #14
naxoc commentedHere is a test for that.
Comment #15
grndlvl commentedConfirmed system-admin-custom-logo-901724-12.patch fixes issue.
Confirmed 901724-14.patch(test case only) correctly detects issue before system-admin-custom-logo-901724-12.patch is applied and Passes successfully with system-admin-custom-logo-901724-12.patch applied.
Test seems to be sufficient for detecting this issue.
Comment #17
naxoc commentedWeird. I can't make the test fail on my machine. Try again, bot!
Comment #18
naxoc commented#14: 901724-14.patch queued for re-testing.
Comment #20
fabsor commentedTests looks fine to me, and I can't reproduce this locally either. I will try to investigate further.
Comment #21
fabsor commented#14: 901724-14.patch queued for re-testing.
Comment #23
naxoc commented#14: 901724-14.patch queued for re-testing.
Comment #25
sunSeriously, don't we have an existing helper function for this...?
I really hope so, but I'm not very familiar with D7's File API yet.
Powered by Dreditor.
Comment #26
sunRelated: #1087250: Custom logo and favicon stored in private filesystem if it is the default
Comment #27
pillarsdotnet commentedHow about
$logo_path = drupal_realpath('public://') . '/' . file_uri_target($logo_path);Comment #28
sun#1376166: Custom logo and favicon functionality inanely tries to support absolute local file paths will likely make this issue obsolete.
Comment #29
catch#1376166: Custom logo and favicon functionality inanely tries to support absolute local file paths was committed to 8.x, and is in the process of being backported to 7.x.
I'm uploading just naxoc's test for this issue by itself, if that passes we can either combine the tests with the other issue, or if similar coverage was added elsewhere, just close this one.
Comment #31
naxoc commentedClosing. There is a test in #1376166: Custom logo and favicon functionality inanely tries to support absolute local file paths now.