Advertisement:

Author Topic: Uploaded Avatars Not Showing  (Read 608 times)

Offline Ian Mc

  • Semi-Newbie
  • *
  • Posts: 24
Uploaded Avatars Not Showing
« on: September 10, 2017, 03:40:32 PM »
Hi all.

I'm in the process of transfering all of the boards and members etc to a new forum which is more or less complete with no problems at all.

The only problem I have is with members who have uploaded their own avatar in which case they are not showing in profiles and posts. Members who have chosen an avatar from the forum choices are all showing ok, as are avatars from an external source from say Photobucket for example.

From what I can gather uploaded avatars are stored in the attachments folder and all attachments in posts etc are showing which seems to confirm that the paths are correct and this is confirmed in repair settings php.

My question is have I missed a setting somewhere that is causing uploaded avatars not to show? Any help would be much appreciated.

Many thanks.

Offline shawnb61

  • Support Specialist
  • Jr. Member
  • *
  • Posts: 363
    • sbulen on GitHub
Re: Uploaded Avatars Not Showing
« Reply #1 on: September 10, 2017, 05:09:28 PM »
I suspect you have an "uploadable avatars" directory specified. 

Look under Admin | Forum | Avatar Settings, towards the bottom of the page for the pertinent settings. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Ian Mc

  • Semi-Newbie
  • *
  • Posts: 24
Re: Uploaded Avatars Not Showing
« Reply #2 on: September 10, 2017, 05:33:43 PM »
I suspect you have an "uploadable avatars" directory specified. 

Look under Admin | Forum | Avatar Settings, towards the bottom of the page for the pertinent settings.

Hi and thanks for your reply.

I can confirm that there is not a directory specified and it is set to the default "attachment" directory.

Offline Ian Mc

  • Semi-Newbie
  • *
  • Posts: 24
Re: Uploaded Avatars Not Showing
« Reply #3 on: September 10, 2017, 05:51:03 PM »
Just a little more info here that has come to light.

When I browse the files via Attachments And Avatars and click on any of the avatar files they return a blank image. .The window that opens is at the avatar size eg 65 x 65 but there's no actual image there as if something has been lost in the transfer from the old forum directory to the new one.

Offline shawnb61

  • Support Specialist
  • Jr. Member
  • *
  • Posts: 363
    • sbulen on GitHub
Re: Uploaded Avatars Not Showing
« Reply #4 on: September 10, 2017, 06:10:51 PM »
Can you see the old server?   Maybe it's the other way around...   I.e., maybe you had a custom avatar directory, now you must specify it in the new configuration.   

Do you see a custom avatar directory in the file manager?

It might be named avs, or custom_avatar....  Or something similar.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 54,807
  • Gender: Male
    • Kindred-999 on GitHub
Re: Uploaded Avatars Not Showing
« Reply #5 on: September 10, 2017, 06:11:35 PM »
Well, for one you should almost always change the directory for avatars so that it does not use the same as the attachments directory.

Assuming that your paths are actually correct, then you may be right and the files were never transferred over... in which case, if you do not have a full backup of your old site files, you may be out of luck
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 47,489
Re: Uploaded Avatars Not Showing
« Reply #6 on: September 10, 2017, 06:26:20 PM »
Well, for one you should almost always change the directory for avatars so that it does not use the same as the attachments directory.


considering it is a hidden feature to do that, most do not ever do that.

Offline Ian Mc

  • Semi-Newbie
  • *
  • Posts: 24
Re: Uploaded Avatars Not Showing
« Reply #7 on: September 10, 2017, 06:36:36 PM »
Well, for one you should almost always change the directory for avatars so that it does not use the same as the attachments directory.

Assuming that your paths are actually correct, then you may be right and the files were never transferred over... in which case, if you do not have a full backup of your old site files, you may be out of luck

It's all very strange because the paths are 100% correct and all attachments and attachment thumbnails all work 100%, it's just the uploaded avatars that won't display.

With regard to back ups I have everything, and just to eliminate a problem during transfer I just did it all again from fresh and exactly the same problem.

If I upload an avatar via the forum profile it also displays just fine, so I can't figure out why it's not working. At the end of the day I can just ask members to upload their avatars again, but obviously I would of prefered it all to be done !!

Offline shawnb61

  • Support Specialist
  • Jr. Member
  • *
  • Posts: 363
    • sbulen on GitHub
Re: Uploaded Avatars Not Showing
« Reply #8 on: September 10, 2017, 06:46:52 PM »
Did you run repair_settings.php?   

Have you looked in the file system?  Is there a 2nd avatar folder there?   

If you restored all files, and restored your db, you should be fine.  The question is where are those avatars, and why are you not pointing to them...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Ian Mc

  • Semi-Newbie
  • *
  • Posts: 24
Re: Uploaded Avatars Not Showing
« Reply #9 on: September 10, 2017, 07:25:09 PM »
Did you run repair_settings.php?   
Yes, and it confirms that the path is correct.

Have you looked in the file system?  Is there a 2nd avatar folder there?   
Yes and there is no second folder. I have since set up a dedicated uploaded avatars folder and moved all the avatars into it and set all the relevant paths etc. If I upload an avatar via forum profile it displays straight away.


If you restored all files, and restored your db, you should be fine.  The question is where are those avatars, and why are you not pointing to them...
Database shows all required tables and rows etc and all files are present.


For some reason it appears that something is getting lost from the images when the original files are ftp'd over to the new forum directory although I have no idea why !!

It's no big deal I'll just ask members with their own avatars to upload them again, I was just hoping I had missed something !!   ::)

Offline shawnb61

  • Support Specialist
  • Jr. Member
  • *
  • Posts: 363
    • sbulen on GitHub
Re: Uploaded Avatars Not Showing
« Reply #10 on: September 10, 2017, 07:48:00 PM »
My guess/hunch was that there was in fact no second folder on your old host, but repair_settings made your forum think there was one...  (E.g., if the folder name was blank but you clicked on the link to create one, or clicked 'restore all settings'...)  Thus making your forum look in a brand new empty folder for those old avatars. 

It would sure be nice to look at the forum on the old host, and double-check all the settings.  They should all be mirrored on the new host.  Especially custom_avatar_dir & custom_avatar_url - on the OLD site.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline shawnb61

  • Support Specialist
  • Jr. Member
  • *
  • Posts: 363
    • sbulen on GitHub
Re: Uploaded Avatars Not Showing
« Reply #11 on: September 10, 2017, 07:56:37 PM »
One last grasp at a straw...   

There is a 'hidden' feature to move your existing avatars from your attachment directory to your new, custom avatar directory. This exists to help you setup new custom avatar directories. 

You invoke it by:
yourforumurl.com/subfolderifused/index.php?action=manageattachments;sa=moveAvatars

If my hunch above is correct, this just might recover your avatars by moving them from attachments to the new avatars folder. 

More here...
https://www.simplemachines.org/community/index.php?topic=197938.0
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Ian Mc

  • Semi-Newbie
  • *
  • Posts: 24
Re: Uploaded Avatars Not Showing
« Reply #12 on: September 11, 2017, 02:46:44 AM »
One last grasp at a straw...   

There is a 'hidden' feature to move your existing avatars from your attachment directory to your new, custom avatar directory. This exists to help you setup new custom avatar directories. 

You invoke it by:
yourforumurl.com/subfolderifused/index.php?action=manageattachments;sa=moveAvatars

If my hunch above is correct, this just might recover your avatars by moving them from attachments to the new avatars folder. 

More here...
https://www.simplemachines.org/community/index.php?topic=197938.0

Unfortunately I've already tried that when I set up the new avatars folder, and although the feature worked it didn't have any effect on the actual display of the avatars.
I can only assume that when and avatar is uploaded and then converted to the long file name in the directory, at that point something forum specific happens and then it won't display if taken to another forum? Having said that it wouldn't explain why attachments do the same and yet they are all working !!
I'm at a complete loss with this one !!  ::)

Offline Ian Mc

  • Semi-Newbie
  • *
  • Posts: 24
Re: Uploaded Avatars Not Showing
« Reply #13 on: September 13, 2017, 02:27:01 PM »
Ok Guys finally fixed this issue with the following procedure.

Fix was based on this thread  https://www.simplemachines.org/community/index.php?topic=197938.0 as was mentioned earlier.

1) On the donor forum create a folder (in my case avatars_uploaded) and follow the procedure on the above link and move all uploaded avatars etc.

2) Download the newly created folder and its contents via ftp.

3) Repeat the procedure on the new forum.

4) Finally overwrite the newly created folder on the new forum with the downloaded folder from the donor forum.

I can only assume that there's a problem with ftp and avatar files with no filename extension and something gets corrupted during transfer. As the "moveAvatars" function converts everything back to png or jpg this cured the problem and all avatars are now showing with no problems.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 54,807
  • Gender: Male
    • Kindred-999 on GitHub
Re: Uploaded Avatars Not Showing
« Reply #14 on: September 13, 2017, 08:55:59 PM »
Oh..,  you used FileZilla, didn't you?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline shawnb61

  • Support Specialist
  • Jr. Member
  • *
  • Posts: 363
    • sbulen on GitHub
Re: Uploaded Avatars Not Showing
« Reply #15 on: September 15, 2017, 03:51:43 PM »
Thanks Kindred...  I remembered there was a gotcha with one of the ftp clients but couldn't remember it... 

IIRC, it must be set to treat files without extensions as binary? 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp