The default picture setting in Drupal is normally an internal link, (e.g. /files/mypic.gif) but the Gravatar URL requires the full URL http://www.mydomain.com/files/mypic.gif. I think it would helpful to automatically append the domain for the URL string.

Comments

Narno’s picture

Status: Active » Closed (fixed)

Off topic ?

henrrrik’s picture

Why?

Narno’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

> "The default picture setting in Drupal is normally an internal link, (e.g. /files/mypic.gif)"
hum, yes

> "but the Gravatar URL requires the full URL http://www.mydomain.com/files/mypic.gif."
yes too

> "I think it would helpful to automatically append the domain for the URL string."
Hum, why ? The Gravatar picture is not downloaded on your website, no cache, it's read from site.gravatar.com.

I don't understand what you want ?! :-P

henrrrik’s picture

I'm talking about the default user picture that's located on the local webserver and is displayed if the user doesn't have a Gravatar account.

Normally (if Gravatar isn't installed) you would enter an internal link in this field, e.g. "/somepath/somefile.jpg". Gravatar module expects a full URL including the domain name, e.g. "http://www.mydomain.com/somepath/somefile.jpg". I had to look at the code to figure out why it didn't find my default picture. I think the URL should be prepended automatically, since I doubt anyone uses an off-site default.

Narno’s picture

Component: User interface » Code
Assigned: Unassigned » Narno
Priority: Minor » Normal
Status: Postponed (maintainer needs more info) » Active

Haaaaa, i see now : I will fix that as soon as possible. thx

Narno’s picture

Status: Active » Fixed

Fixed ! :-)

if (!preg_match('/^[a-z]+:\/\//', $default)) {
  global $base_url;
  $default = $base_url . '/' . $default;
}
henrrrik’s picture

Great! Thanks.

Narno’s picture

Status: Fixed » Active

There is the same bug on admin page...

Narno’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.