News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Uploaded Avatars Not Showing

Started by Ian Mc, September 10, 2017, 03:40:32 PM

Previous topic - Next topic

Ian Mc

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.

shawnb61

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

Ian Mc

Quote from: shawnb61 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.

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.

Ian Mc

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.

shawnb61

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

Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

Quote from: Kindred 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.


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

Ian Mc

Quote from: Kindred 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

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 !!

shawnb61

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

Ian Mc

Quote from: shawnb61 on September 10, 2017, 06:46:52 PM
Did you run repair_settings.php?   
Yes, and it confirms that the path is correct.

Quote from: shawnb61 on September 10, 2017, 06:46:52 PM
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.


Quote from: shawnb61 on September 10, 2017, 06:46:52 PM
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 !!   ::)

shawnb61

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

shawnb61

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

Ian Mc

Quote from: shawnb61 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

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 !!  ::)

Ian Mc

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.

Kindred

Oh..,  you used FileZilla, didn't you?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

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

Ian Mc

Quote from: Kindred on September 13, 2017, 08:55:59 PM
Oh..,  you used FileZilla, didn't you?
Yes I latched onto the FileZilla issue a couple of days later. Pity I didn't find it earlier really, it would of saved me wasting two days of my life !!  ;)

Advertisement: