WordPress.org

Forums

Add Local Avatar
Image uploading, not showing (28 posts)

  1. swerls
    Member
    Posted 4 years ago #

    I have done absolutely everything and read every article. I have used just /avatars and the image doesn't show, then in order for it to upload not using legacy mode you need the path /public_html/avatars and that doesn't show the image either.

    It will upload every time but will not show! Just shows a fail image looking picture which is super annoying. Any feedback?

  2. DougJoseph
    Member
    Posted 4 years ago #

    My experience is about the same as yours.

  3. SidianMSJones
    Member
    Posted 4 years ago #

    Same experience here. I just downloaded the latest update today but it's still broken. At least the update fixed the admin bar issue.

  4. DougJoseph
    Member
    Posted 4 years ago #

    Correction: My issue was actually somewhat different, and I was able to work around it by tweaking the code some.

  5. simonleuf
    Member
    Posted 4 years ago #

    I also have this problem! The avatars are being uploaded correctly and I can see them in the avatars folder. But somehow they won't show up on the blog page.

  6. Tevya
    Member
    Posted 4 years ago #

    Same thing here. Using 3.1 I can't seem to upload an image no matter what I do. I can get it to error out saying "folder does not exist", but that's it the only other result is that it appears to work I can even see the file is uploaded into the proper folder when I look via my FTP client, but the image will not show up in the edit user area or on the front-end.

    Is everyone else using WP 3.1? Or is this a problem with other versions of WP? Because the plugin says its compatible up through 3.0.5. So I'm wondering if the dev just needs to make some tweaks for 3.1. I believe that the normal image uploader received some tweaks for 3.1.

  7. DougJoseph
    Member
    Posted 4 years ago #

    I am using 3.1

    The best I could tell, somehow the code's effort to test for the existence of the uploaded file ... failed. The plugin threw an error code that gets displayed, however, the file does get uploaded, and it does get displayed.

    It's been a while, but I think I tweaked the code to ignore the failed test.

  8. SidianMSJones
    Member
    Posted 4 years ago #

    No, the pictures are definitely not showing up.

  9. DougJoseph
    Member
    Posted 4 years ago #

    Was referring to our experience, as the poster above had asked about it. :-)

  10. DougJoseph
    Member
    Posted 4 years ago #

    One plugin I worked with recently would not work if it had been "network activated" but it worked fine on a multisite network if it was activated on each blog individually. I cannot remember for sure if it was this one. -- revised to say: I think it was AMR-list plugin. Sorry.

  11. Tevya
    Member
    Posted 4 years ago #

    I'm running it on a single WP install. No multi-site. And I can't get it to work for anything. Anyone heard from the dev? If there's an update coming out?

  12. DougJoseph
    Member
    Posted 4 years ago #

    SidianMSJones and Tevya:

    I know your issues could be unrelated, and your setups are different, but the questions are the same for both:

    What kind of hosting are you on?

    Where did you put your "avatars" folder?

    Did you set permissions on it using CHMOD? What permissions?

    How do you have your options set up in the wp-admin? (Tools > Avatars)

    The only problems I ran into with this plugin were:

    1. It detects multisite mode, and tells me to install the plugin in the mu-plugins folder, but doing so does not work, and the plugin developer later told me that should not be done. Apparently it is an old bit of code. I simply ignore than warning.

    2. It claims the avatar was not uploaded when in fact it was. I tweaked the code to disable that false alarm.

    I suspect you are dealing with either a path issue or a permissions issue.

    BTW: the plugin author was very kind to reply to my emails, and he always replied promptly and with helpful info.

  13. DougJoseph
    Member
    Posted 4 years ago #

    Anyone heard from the dev? If there's an update coming out?

    The recent update addressed the release of WP 3.1 and its new admin bar.

  14. DougJoseph
    Member
    Posted 4 years ago #

    Here is a thread where I chronicled my issues getting started.

    http://wordpress.org/support/topic/plugin-add-local-avatar-upload-local-avatar-feature-not-funtional?replies=4

    At first I had created my "avatars" folder somewhere beside the web root. At that point the avatars were getting uploaded, but were not showing. When I then moved the avatars folder to the web root (and edited the plugin settings to match) they started showing. This was of course after permissions were set properly on the folder.

    Notice also that I have enabled the option under the path, called:

    Or, use legacy (v7.3 and lower) $_SERVER['DOCUMENT_ROOT'] method , this option often helps when using sub-domains.

  15. Tevya
    Member
    Posted 4 years ago #

    So the avatars can go in a folder, but that folder must be in the web root? I'll try that and see what happens. But to me, that's still a bug that needs fixing in the plugin itself. Why would you give a field to set that, but then require it to be in a certain place? The only flexibility would be the name of the folder itself.

  16. DougJoseph
    Member
    Posted 4 years ago #

    Path issues can be tricky, and there can be variances from host to host. When dealing with a free plugin, I take bugs for granted, and I'm happy if I can find a work around and get it working. The plugin author may or may not know all the WP codex and its tools, but I know that many know more than I. You're perhaps right that it is something that better code could address, but in the absence of better code, at least the part that works can be used. :-)

  17. Tevya
    Member
    Posted 4 years ago #

    @DougJosehph Don't get me wrong, I'm not trying to make some whiny "I want my money back"--when I didn't even pay for it, request. My feeling has been that around here most developers want to know if there's a problem with their plugin so they can fix it. I was merely pointing out that I still saw this as a problem. If the dev doesn't, that's their decision, not mine. If they choose not to fix it, I'll do what I can to make it work, since its the only one of its kind (that I'm aware of).

  18. DougJoseph
    Member
    Posted 4 years ago #

    I gotcha. Let us know if the moving your avatar folder into your web root folder works. Remember you may need to enable that legacy mode option.

    Here is a screen shot of my setup options that DO work. :-)

    http://wvupci.org/avatars/avatar-setup.jpg

    Note that I blanked out (blurred) my behind-the-scenes physical path on my host server.

  19. carney
    Member
    Posted 4 years ago #

    I checked this page the other day, and had no luck so looked into the problem myself!

    Now im no php guru but i wanted this feature to work regardless and now i have it working with a simple code change im fine to leave it. (Now let me know if my way is going to cause me any feature hassels!)

    Now obviously the problem is that without legacy mode on its calling to your servers absolute $root ( '/' ). and it needs to be in your /public_html/ (or equal).

    So open...
    avatars.php (found in the .../wp-content/plugins/add-local-avatar) dir.

    Goto // Helper function to find root directory.

    Now line: 145 is where the magic happens.

    Change from:
    return substr(ABSPATH, 0, -strlen(strrchr(substr(ABSPATH, 0, -1), '/')) - 1);

    To:
    return substr(ABSPATH, 0, -strlen(strrchr(substr(ABSPATH, 0, -1), 'DOCUMENT_ROOT')) - 1);

    Save Upload Overwrite.

    and then under your avatar settings.
    User uploads: Checked[x] [/avatars]

    done.

  20. carney
    Member
    Posted 4 years ago #

    also Don't have legacy mode on... obviously this way /avatars is just created in the Document Root instead.

  21. DougJoseph
    Member
    Posted 4 years ago #

    I don't know the plugin's inner workings, and therefore I don't know if the plugin works from physical path or virtual path. So, I cannot comment, except to say that if this change makes the plugin work for you, it seems good.

  22. Tevya
    Member
    Posted 4 years ago #

    @DougJoseph your settings did work for me. I'm just going to stick with legacy mode for now. I may try @carney's method when I get some time as I assume it's called "legacy" mode for a reason.

  23. zandercent
    Member
    Posted 4 years ago #

    Thanks Carney - you saved me a couple of hours there!

    to everyone else - just follow carney's instructions - peice of cake.

  24. Tevya
    Member
    Posted 4 years ago #

    @carney can you explain

    Goto // Helper function to find root directory.

    ? Please.

    EDIT: Nevermind. I still don't understand what that means, but replaced that line of code and it seems to work perfectly now! Thanks much!

    Perhaps the dev will see this and implement it into the plugin?

  25. dojopan
    Member
    Posted 3 years ago #

    @DougJoseph
    You da man! Your jpeg allowed me to go to bed before midnight and I'm very tired and very grateful :)

  26. DougJoseph
    Member
    Posted 3 years ago #

    Glad the JPG helped!

  27. gaidin
    Member
    Posted 3 years ago #

    The problem seem to be caused by the difference between how some host handle the root folder assignment.

    my solution from over a year ago: found here, is to set the plugin root to the wordpress installed location

  28. Abigail
    Member
    Posted 3 years ago #

    Here is a thread where I chronicled my issues getting started.

    http://wordpress.org/support/topic/plugin-add-local-avatar-upload-local-avatar-feature-not-funtional?replies=4

    At first I had created my "avatars" folder somewhere beside the web root. At that point the avatars were getting uploaded, but were not showing. When I then moved the avatars folder to the web root (and edited the plugin settings to match) they started showing. This was of course after permissions were set properly on the folder.

    Notice also that I have enabled the option under the path, called:

    Or, use legacy (v7.3 and lower) $_SERVER['DOCUMENT_ROOT'] method , this option often helps when using sub-domains.

    This is exactly what fixed my problem. It happened to me twice on two different domains.

    First I had to create the avatars folder beside the webroot /public_html/avatars then set the permissions.

    Then I changed the settings on the plugin to match. But that didn't work. The images were uploaded but never showed up.

    I moved my avatars folder into the webroot /public_html/domain/avatars and changed the settings on the plugins, then everything just started working!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Add Local Avatar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic