Uploaded avatar wont replace default placeholder image

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Cruisey
    Member
    • Apr 2018
    • 53
    • 4.2.x

    [Resolved] 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 13 Sep '18, 7:50am.
  • In Omnibus
    Senior Member
    • Apr 2010
    • 2310

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

    Comment

    • Cruisey
      Member
      • Apr 2018
      • 53
      • 4.2.x

      #3
      Originally posted by In Omnibus
      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

      • In Omnibus
        Senior Member
        • Apr 2010
        • 2310

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

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

        Comment

        • Cruisey
          Member
          • Apr 2018
          • 53
          • 4.2.x

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

          Comment

          • In Omnibus
            Senior Member
            • Apr 2010
            • 2310

            #6
            Originally posted by Cruisey
            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

            • Cruisey
              Member
              • Apr 2018
              • 53
              • 4.2.x

              #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

              • glennrocksvb
                Former vBulletin Developer
                • Mar 2011
                • 4011
                • 5.7.X

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

                Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                Comment

                • Cruisey
                  Member
                  • Apr 2018
                  • 53
                  • 4.2.x

                  #9
                  Originally posted by Glenn Vergara
                  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

                  • Mark.B
                    vBulletin Support
                    • Feb 2004
                    • 24286
                    • 6.0.X

                    #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
                    ------------
                    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                    Comment

                    • Cruisey
                      Member
                      • Apr 2018
                      • 53
                      • 4.2.x

                      #11
                      Originally posted by Mark.B
                      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

                      • Mark.B
                        vBulletin Support
                        • Feb 2004
                        • 24286
                        • 6.0.X

                        #12
                        Originally posted by Cruisey

                        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
                        ------------
                        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                        Comment

                        • Cruisey
                          Member
                          • Apr 2018
                          • 53
                          • 4.2.x

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

                          Comment

                          • AV_whiz
                            Member
                            • Jan 2020
                            • 55

                            #14
                            I am getting same issue....custom avatar is not showing even though it uploaded in directory & save in customavatars table in database.

                            Dont know why its taking default avatar always.

                            please help, Mark i need your help
                            Last edited by AV_whiz; Sat 25 Apr '20, 11:05pm.

                            Comment

                            • ahobilam
                              New Member
                              • Aug 2011
                              • 28
                              • 4.1.x

                              #15
                              Recently I upgraded to 4.5 to VB 5.65
                              I am also not able to change the avatar in profile or in admincp
                              I am able to upload images
                              As per php Info:
                              GD support found enabled.
                              imagick module version 3.4.4
                              imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
                              I have copy of customavatar folder both under core and forums (basic url) with permissions - 757
                              but I am not able to change my avatar
                              what else to be changed to rectify this. please reply asap.
                              thanks

                              Comment

                              Related Topics

                              Collapse

                              Working...