gravatar not displayed if mail not part of author
rhodecode/templates/changeset/changeset.html uses rhodecode/lib/vcs/utils/init.py->author_email to get the email of the author
This function does not consult the DB for the email of the author but only looks if the author text contains an email. I think the author_email function should try to find an email in the DB.
Comments (12)
-
repo owner -
repo owner ahh sory I'm wrong person returns username in case we match in DB, it should be email_or_none which try to match email if no email try to match username in rhodecode DB, and get email from this user
-
reporter Thanks email_or_none works Should I create a pull request or did you already change the file in your sources?
-
repo owner i fixed it, thanks
-
repo owner - changed status to resolved
-
reporter - changed status to open
-
reporter sorry for reopening this but there are more files with the same problem
rhodecode\templates\admin\notifications\notifications_data.html rhodecode\templates\admin\notifications\show_notification.html rhodecode\templates\changelog\changelog.html rhodecode\templates\changeset\changeset_range.html rhodecode\templates\compare\compare_cs.html rhodecode\templates\files\files_source.html rhodecode\templates\search\search_commit.html
-
repo owner I don't know why i didn't check other occurrences good you checked that ! Thanks.
-
repo owner - changed status to resolved
-
reporter sorry still one missing :-) rhodecode\templates\files\files_source.html I fixed it like this
@@ -14,7 +14,7 @@ <div class="item">${h.literal(ungettext(u'%s author',u'%s authors',len(c.authors)) % ('<b>%s</b>' % len(c.authors))) }</div> %for email, user in c.authors: <div class="contributor tooltip" style="float:left" title="${h.tooltip(user)}"> - <div class="gravatar" style="margin:1px"><img alt="gravatar" src="${h.gravatar_url(email, 20)}"/> </div> + <div class="gravatar" style="margin:1px"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(user), 20)}"/> </div> </div> %endfor </div>
-
reporter - changed status to open
-
repo owner - changed status to resolved
We have completly change the mapping in RC 3.5, now there's a concept of user profiles that we have. Also checked all the code that was doing the mapping. It's now very consistent, and this issue should be fixed.
- Log in to comment
I think it's a small bug, it should be h.person (which get's info from db) instead of h.email