MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

gravatar fallback urls not working?  (Mono Support )

Viewed 7772 time(s), 6 post(s) 6/2/2014 7:25:21 PMby Zoomicon

Related topics

Zoomicon

Zoomicon

6/2/2014 7:25:21 PM

at http://social.clipflair.net/MonoX/Pages/SocialNetworking/Discussion/dtopic/jlmzOJmkgU-C_6L2APJdYQ/Some-activities-Portuguese-and-Irish/ I see the user has avatar image http://www.gravatar.com/avatar.php?gravatar_id=94db843c14f311ce0ab4d26a8c037bb2&rating=G&size=80&d=http://social.clipflair.net/App_Themes/Common/img/avatar_blank.jpg which fails to show any image

the reason is I think that https://fr.gravatar.com/site/implement/images/ says the default image (fallback) url HAS TO BE URLENCODED:
</br>
</br>"If you'd prefer to use your own default image (perhaps your logo, a funny face, whatever), then you can easily do so by supplying the URL to an image in the d= or default= parameter. The URL should be URL-encoded to ensure that it carries across correctly" https://fr.gravatar.com/site/implement/images/

This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/4/2014 12:29:41 PM

It seems the issue is in web.config, where it writes (at least it was like that in our web.config):

    <!-- Available values: identicon, monsterid, wavatar, full URL-encoded http address or virtual path of an image that should be served as a default image if there is no image for a particular address: http%3A%2F%2Fexample.com%2Fimages%2Fexample.jpg -->
</br>    <add key="GravatarType" value="/App_Themes/Common/img/avatar_blank.jpg" />

the comment there does have a URL-encoded example, but doesn't state it specifically that you should use such

also, I just realized I can use identicon there instead of a fixed image which is better I think if many users don't have a gravatar, by entering the value "identicon" at the above entry in web.config (documented at http://blog.gravatar.com/2008/04/22/identicons-monsterids-and-wavatars-oh-my/ too)

This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/4/2014 12:38:47 PM

tried changing the entry to

<add key="GravatarType" value="~%2FApp_Themes%2FCommon%2Fimg%2Favatar_blank.jpg" />

but it doesn't work. Could it be the ~%2F ? Do I need to write / instead of ~%2F at start?

user Dorothy seems to now get the image
</br>http://www.gravatar.com/avatar.php?gravatar_id=94db843c14f311ce0ab4d26a8c037bb2&rating=G&size=80&d=%7e%252FApp_Themes%252FCommon%252Fimg%252Favatar_blank.jpg
</br>which is strange. Are you URL encoding that entry yourselves? In that case the comment in web.config needs to change to not have a URL encoded url, but a normal one

This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/4/2014 12:44:13 PM

I ended up using "identicon" there (more "professional" than wavatar and monsterid in my opinion)

This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/6/2014 11:57:14 AM

could the issue with the fallback URL not working be related to that other issue you fixed regarding the user gravatars and the cache?

I'm happier with the identicon, but would be nice to know the fallback image is an option that works

This content has not been rated yet. 
2793 Reputation 345 Total posts
vzakanj

vzakanj

6/17/2014 10:06:34 AM
Hi Zoomicon,
the issue is not related to the previous fixed issue, it is actually a separate bug caused by the GravatarType being decoded in all cases.

It has been logged to the internal bug tracker and will be fixed in one of the next MonoX releases.

Regards,
Vedran
This content has not been rated yet. 
345 Reputation 61 Total posts