Announcement

Collapse
No announcement yet.

Uploaded avatar wont replace default placeholder image

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Uploaded avatar wont replace default placeholder image

    If it works on local machine and not on server, then it's a server issue right? But, where/what?

    On local, I can change/upload an avatar (registered user). Once uploaded, I see the changes automatically. On live site, I browse to image, crop then save. Placeholder image not changing as local machine did. Files are being uploaded to core/customavatars. I see the image as avatar<USER-ID>_<VERSION>.jpeg

    Could someone please tell me how to sort this? Im getting a "million and one " issues upgrading from 5.4.2 to 5.4.3
    Last edited by Cruisey; Thu 13th Sep '18, 7:50am.

  • #2
    Did you Rebuild Custom Avatar Thumbnails in the AdminCP / Maintenance / General Update Tools?

    Comment


    • #3
      Originally posted by In Omnibus View Post
      Did you Rebuild Custom Avatar Thumbnails in the AdminCP / Maintenance / General Update Tools?
      Yes, I have. So uploading is not an issue. Somewhere in the code it's not switching to the uploaded location. Is there something in the code that tells if a user has uploaded an image? I may have to reverse engineer the js to see what's going on but I may need help on this.

      Comment


      • #4
        What I would do is replace the default image with your default image.

        https://yoursite.com/core/images/def...atar_large.png

        Comment


        • #5
          Well...I would never recommend someone to do that. Users (not me) cannot change their avatar.

          Comment


          • #6
            Originally posted by Cruisey View Post
            Well...I would never recommend someone to do that. Users (not me) cannot change their avatar.
            That's just the default image. Members can still upload a custom avatar.

            Comment


            • #7
              I have more information. Inside the widget_profile_sidebar, I found:

              Code:
              <vb:if condition="!empty($avatarUrl['avatarpath']) AND !empty($avatarUrl['hascustom'])">
                                  <div class="profile-photo-wrapper h-align-center">
                                      <img class="profile-photo" src="{vb:raw baseurl_corecdn}/{vb:raw avatarUrl.avatarpath}"  alt="{vb:raw userInfo.username}" id="profilePicImg" />
                              <vb:else />
                                  <div class="profile-photo-wrapper h-align-center no-profile-pic">
                                      <img class="profile-photo" src="{vb:raw baseurl_corecdn}/images/default/default_avatar_large.png" width="200" height="200" alt="{vb:phrase profile_picture_guser}" id="profilePicImg" />
                              </vb:if>
              So somehow the below is not evaluating to true:

              Code:
              !empty($avatarUrl['avatarpath']) AND !empty($avatarUrl['hascustom'])

              Comment


              • #8
                If you open the user profile in the User Manager in AdminCP, do you see the uploaded avatar in the Image Options section?

                GIPHY for vB5 | AutoLinker | Video Attachments Player | Last Registered Users Module | Clear System Cache Cron | Drag-n-Drop Upload | Topic AJAX AutoUpdate | Force Read Topic

                Comment


                • #9
                  Originally posted by Glenn Vergara View Post
                  If you open the user profile in the User Manager in AdminCP, do you see the uploaded avatar in the Image Options section?
                  YES! I do...Im getting excited. Its there but not on the pages. So the avatar only shows in the admincp

                  Comment


                  • #10
                    Are you storing them in the database or the file system?
                    If the file system, what location are they physically in on the server?
                    MARK.B | vBULLETIN SUPPORT

                    TalkNewsUK - My vBulletin 5.4.2 Demo - FEATURING "ROUTE BY NODE"!
                    AdminAmmo - My Cloud Demo

                    Comment


                    • #11
                      Originally posted by Mark.B View Post
                      Are you storing them in the database or the file system?
                      If the file system, what location are they physically in on the server?
                      Filesystem? Yes. Location? /core/customavatars: <domain>/forum/core/customavatars. Files are correctly uploaded to that folder.

                      Comment


                      • #12
                        Originally posted by Cruisey View Post

                        Filesystem? Yes. Location? /core/customavatars: <domain>/forum/core/customavatars. Files are correctly uploaded to that folder.
                        Are the write permissions recursive within the customavatars folder? (In other words they cascade all the way down, rather than just being set at the top level).

                        This is very much a long shot, but could you please copy (not move) the customavatars folder so it's also at <domain>/forum//customavatars.
                        Set the same recursive permissions on it as well.
                        MARK.B | vBULLETIN SUPPORT

                        TalkNewsUK - My vBulletin 5.4.2 Demo - FEATURING "ROUTE BY NODE"!
                        AdminAmmo - My Cloud Demo

                        Comment


                        • #13
                          SOLVED: Placed at "./customavatars" with recursive permission for all sub folders. Thank you!

                          Comment

                          Working...
                          X