Support » Plugin: BuddyPress First Letter Avatar » Not working on local dev environment

  • Resolved kalico

    (@kalico)


    This isn’t critical, but I am curious if you know why I can’t get this to work in my local environment. All the first-letter-avatars are referring to a URL like this:

    http://i2.wp.com/MYSITE.DEV/wp-content/plugins/buddypress-first-letter-avatar/images/default/96/latin_n.png

    (where MYSITE.DEV is the local version of my site.)

    And when I try to open the image in a new tab, I see an error message that says:

    We cannot complete this request, remote data could not be fetched

    The images are resident on my local system, at the folder location indicated in the URL.

    My local environment is using XAMP in DesktopServer and it loads other external URLs just fine. For example, if a user has a Gravatar available, it will load up locally.

    Thanks for any advice.

    • This topic was modified 10 months, 1 week ago by  kalico.
    • This topic was modified 10 months, 1 week ago by  kalico.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello Kalico,

    It appears you are running Jetpack and using their CDN. Locally you are behind a router/firewall which would block incoming requests.

    You can go into the wp-config.php file and add the JetPack developer define and this will allow your site to pull it’s images from your lical media library.

    You can turn on Development Mode by adding define( ‘JETPACK_DEV_DEBUG’, true); to your wp-config.php file. Make sure you add it before the /* That’s all, stop editing! Happy blogging. */ line.

    We hope you find this information helpful.

    Thanks for the reply. But no, actually….I’m not using Jetpack. I’m on a Mac, and the firewall is off. I am able to accept incoming requests for other things. As mentioned, if a user has a Gravatar, it will show up locally.

    Any other ideas?

    • This reply was modified 10 months, 1 week ago by  kalico.
    Plugin Author Dev49.net

    (@dev49net)

    Hi there,
    The avatars are fetched using Gravatar. Gravatar grabs the user image, downloads it to their servers and serves it from there. Since you are developing locally, Gravatar cannot fetch this image.

    If you uncheck “Enable Gravatars” in my plugin settings, the images will not be passed through Gravatar, they will be served directly from your localhost and it will work.

    Gravatar needs to be serving the image, because we cannot check whether user has Gravatar or not – so we cannot know wheter to show Gravatar or letter avatar. By passing URL through Gravatar, we are basically saying to Gravatar “if this user has Gravatar -> show gravatar, if not -> show the image located in this URL”.

    Marking this one as resolved – not really an issue, just a way things have to work. If you open up your local environment so that Gravatar could access it, it will work.

    Kind regards,
    Daniel Wroblewski

    • This reply was modified 10 months, 1 week ago by  Dev49.net.

    That did the trick! Thank you, Daniel. Can you tell me where in the database this “switch” is located, so I can avoid overwriting it when I sync my database?

    Plugin Author Dev49.net

    (@dev49net)

    bpfla_settings entry in wp_options table. All settings of my plugin are stored in this one entry. Inside you’ll find bpfla_use_gravatar key.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Not working on local dev environment’ is closed to new replies.