• Hannah@GetPaidSurveys.com

    (@hannahgetpaidsurveyscom)


    I use WordPress in my work, and while I am an administrator, I’m still not exactly sure where everything is placed.

    Our site has many comments, and most of these have the icons (avatars or whatever you like to call them) next to the comment. These appear to be based upon the email address given when the comment was made. We have, under “Settings -> Discussion,” enabled Avatars and use the “Mystery man” avatar. We also allow Gravatar images if set up by the user.

    All of this, so far, is good. The problem comes when editing a comment that has already been made. Occasionally, we will need to change the email address associated with a comment, for one reason or another. Unfortunately, the avatar that was originally put on the post for the first email address STAYS, and it is NOT replaced by the avatar for the new email address. I should note that this occurs both with email addresses belonging to people who comment on our site without having a WordPress account, AND with people who have accounts on our site.

    Is there a way to force a refresh of the system so that it uses the correct avatar or otherwise make the change occur? I cannot seem to find where the system stores the correlation of emailaddress = this image, other than the users profile pages, and as I stated before, changing a comment from one user’s email address to another user’s email address leaves the avatar of the first user attached to the comment.

    Thanks for any help you can give! I know this is a relatively minor issue, but it is definitely annoying me. šŸ™‚

Viewing 13 replies - 1 through 13 (of 13 total)
  • luckdragon

    (@luckdragon)

    it is probably stored in wp_usermeta

    luckdragon

    (@luckdragon)

    from the looks of things, it is supposed to get the avatar when it builds the list of comments for that user, if you are changing the email, without changing a user id, it might be pulling the avatar for that user id and ignoring the email, (according to the get_avatar function, id takes precedence over email address).

    Thread Starter Hannah@GetPaidSurveys.com

    (@hannahgetpaidsurveyscom)

    Ah. And I’m guessing that I’d have to go in to the database to change the user_id?

    esmi

    (@esmi)

    Don’t change the user_id! Are you using any caching plugin?

    Thread Starter Hannah@GetPaidSurveys.com

    (@hannahgetpaidsurveyscom)

    esmi-

    If you mean plugins that need to have the cache flushed after they are changed, yes we do. (I regularly flush the cache after making changes.)

    If you mean some sort of plugin that is specifically a plugin to do caching, I do not believe so.

    I really hope to be able to fix this without having to do work in the databases. It is just annoying to (for instance) have some old posts incorrectly have the avatar of our site administrator, and it would be nice to be able to fix this.

    esmi

    (@esmi)

    How long are you waiting for the avatars to update? It may take some time.

    Thread Starter Hannah@GetPaidSurveys.com

    (@hannahgetpaidsurveyscom)

    esmi-

    I have some posts where I have changed the email address yesterday, and a few others that I tried several weeks ago. None of them have changed/updated at all.

    Thread Starter Hannah@GetPaidSurveys.com

    (@hannahgetpaidsurveyscom)

    And I apologize for any confusion on terminology above – I really mean “comments” when I said “posts”

    esmi

    (@esmi)

    Have you checked that the new email address is associated with the correct gravatar.com account?

    Thread Starter Hannah@GetPaidSurveys.com

    (@hannahgetpaidsurveyscom)

    While we do allow gravatar images if the user has them, this issue is not really dealing with that. I believe that the majority of the instances where this is an issue, the users do not have gravatar accounts.

    In one instance, I know the incorrect image is tied to an email with a gravatar account, but the email address that the comment was changed to does NOT have a gravatar account.

    In another instance, both email accounts involved do not have gravatar accounts at all.

    esmi

    (@esmi)

    So… you don’t want the Mystery Man showing for these commentators?

    Thread Starter Hannah@GetPaidSurveys.com

    (@hannahgetpaidsurveyscom)

    esmi-

    I think that we may be talking cross-purposes here, so let me restate the problem so we’re both on the same page.

    I have multiple existing comments from an existing site.

    People who comment fall into one of several categories:
    (1) Registered users/contributors with the site (few) who have avatars set in WordPress for them
    (2) Nonregistered users who just post comments. These fall into two sub-categories:
    (a) Gravatar users (few)
    (b) users with no set avatar, who are automatically issued whatever our site is set for. (Currently “Mystery Man” but we have used computer-generated sets of avatars in the past and may return to this after this issue is resolved.)

    Here is an example of a possible problem:

    A user posts on the forum. He doesn’t want to use his own email, so for some reason uses the “admin@ourdomain” email address. This automatically uses the avatar associated with the admin account. The content of his message is good, and we want to retain that. So, we either remove the email address in the comment or change it. (Doesn’t seem to matter which one).
    Unfortunately, the avatar associated with the admin account remains, even though the email has changed. Obviously, we do not want it to appear to the casual glance as though this was an admin-created comment. How can we change this, while retaining the comment? (For purposes of this example, we’ll say that it already has sub-comments beneath it, so we do not want to delete and recreate it.)

    Here is another example issue: One of our regular contributors had made many posts under an old email address. She had an account with our site, and had an avatar set with this email account. She then later got a new email address and updated her profile to have this instead. Her old comments with the old address remained, and kept the old avatar. We then moved our WordPress installation to a new server, keeping all comments, but now all of her old comments with the old avatar use “Mystery Man” instead of the old avatar.
    We tried manually editing the old email address in the comments to change it to the new email address (remembering that the new email address IS correctly associated with the avatar), but simply changing the old email address did NOT change the avatar.

    There are a few other situations where we have wrong avatars showing up. It was much more obvious when we DID use a generated set of avatars, because in some cases an old user had changed email addresses multiple times, and their comments were now associated with three or more different avatars. That’s part of why we changed to a single avatar for everything (other than Gravatars).

    Is there any hope for this situation? Is there ANY way to easily change what avatars are associated with what commentors? (Again, keeping in mind that the vast majority of these people just comment on our site and do not have accounts.)

    esmi

    (@esmi)

    Sorry – not that I am aware of.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Changing images associated with comments’ is closed to new replies.