Closed (fixed)
Project:
Advanced Profile Kit
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2008 at 15:16 UTC
Updated:
15 Feb 2008 at 14:31 UTC
for some reason l'm getting the wrong advanced_profile.css path rendered here is a clip on my source
<style type="text/css" media="all">@import "/sites/all/modules/cck/fieldgroup.css";</style>
<style type="text/css" media="all">@import "/sites/all/modules/panels/css/panels.css";</style>
<style type="text/css" media="all">@import "//advprofile/advanced_profile.css";</style>
<style type="text/css" media="all">@import "/sites/all/modules/panels/layouts/flexible.css";</style>
<style type="text/css" media="all">@import "/sites/all/modules/panels/layouts/twocol.css";</style>
<style type="text/css" media="all">@import "/modules/comment/comment.css";</style>
Comments
Comment #1
blairski commentedI had a similar problem, except for me, the path to the CSS file included the theme name twice.
I have had a look at the advance profile module and the problem relates to this code:
// Add in the CSS for the user profile page
drupal_add_css($vars['directory'] . '/' . $profile_theme .'/advanced_profile.css');
I replaced it with this and this fixed it:
drupal_add_css('themes/' . $profile_theme .'/advanced_profile.css');
This may not work for you if your theme is not in the theme folder. Michelle, will you be able to fix this in the module itself?
Comment #2
michellebustaboy - I did some asking around and it turns out the directory variable is not reliable. It's always worked for me so I figured I'd use that and save a function call. But I guess there's some times when it doesn't work. So I'm going to replace it with this:
It will be a while before I do alpha 3 so just go ahead and patch yours for now and it will be fixed whenever I get it out.
blairski - That path is totally wrong. That would come out to '/themes/advprofile/advanced_profile.css' which isn't where it should be at all.
Comment #3
blairski commentedMichelle,
The path I used works for me!
Your new one does not work. It produces the following CSS path:
@import "/dev/themes/blairski_template/blairski_template/advprofile/advanced_profile.css"; So the template directory is being added twice, which is what the orginal function was doing. I think both path_to_theme and $profile_theme are adding the template directory, hence it is showing up twice in the pathComment #4
michelle$profile_theme is the path from your directory to the profile theme. Which is going to be simply "advprofile" unless you changed it in settings. If you're getting it twice, then something is screwed up on your site. So bustaboy needs to use the code I pasted, not yours, or it won't work for him.
Michelle
Comment #5
bustaboy commentedthanks Michelle,
works like a charm
Comment #6
michelleGreat, glad to hear it!
Michelle
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.