Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Default Avatars exist, but SP not finding them
Avatar
Patricia Miller
Member
sp_UserOfflineSmall Offline
May 16, 2016 - 3:29 pm

Using SP version 5.6.4

I noticed that when I view my forum when not logged in, the default 'guest' avatar does not show (just the image placeholder with a question mark). In the source code it shows the image src="mm".

EDIT: This is only for the first 'avatar' on the page, in the upper right where it encourages guests to register - in the posts themselves it does display the correct (guest) avatar.

SO my guess is that it's a flaw in the theme (?) - I created a child theme of the css-only theme in order to modify some of the CSS, but made no other changes to any template files.  If you can tell me where to fix this in the template file, I can do that.

THAT SAID, there is still an 'oddity' in the Settings, where it shows that the default avatars folder doesn't exist when it actually does......read on for that......

In my Settings>Profiles>Avatar Options, at the bottom under Available Default Avatars it says "The avatar defaults folder does not exist"

But in my Settings>Integration>Storage Location it shows that I do indeed have a folder named /sp-resources/forum-avatars as well as a folder for the avatars pool, both show green check marks and writeable.....I also (just to double-check) verified this using my FTP program, the folders are there, are writeable, and do have avatar images including a default 'guest' image.

Also not sure this is relevent but in my Avatars Options settings I have the order as this:

Gravatars
WP Avatars
SP Default Avatars
Avatar Pool
Remote Avatars
Uploaded Avatars

Uploading is disabled by choice, and I'm not sure what "remote avatars" is - I enabled that checkbox because I thought it was necessary for Gravatars, but if not please let me know so I can disable it again.

Any ideas on why my default avatars won't show?

It will be a looooong time before I can update SP because the newer version now *requires* WP 4.5 and it will be a long time before I can update WP, so if there is a fix I need to make in my version let me know - I'm pretty comfortable modifying code if needed.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 16, 2016 - 4:23 pm

The 'default avatars' development was released in 5.6.2 so I am a little surprised that problems have not occurred before now.

The folder that holds the default avatars is actually a sub-folder of the 'forum-avatars' folder and should be called 'defaults'. It does not have its own entry in the storage locations listing.

When created during the upgrade default files were moved from the original 'forum-avatars' folder into their new location. Perhaps you could take a look there and see what you have. There should be a minimum of 4 of them...

If we can do this first to ensure things are where hey should be then we can look at the other avatars issue.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Patricia Miller
Member
sp_UserOfflineSmall Offline
May 16, 2016 - 5:02 pm

Hi Yellow Swordfish, thanks for the very quick reply!

It may have been going on for a while, I don't typically go to my forum when not logged in, but was making some minor CSS tweaks and just wanted to ensure it looked right across several browsers.

SO in my folders, I just have /forum-avatars, and in that folder are three default images (I don't know if at one time there were four, but there are only three now) they are admindefault.png, guestdefault.png, and userdefault.png.  I also found an /forum-avatars-old folder, but it has the same three images.

It sounds like I need to create a sub-folder called /defaults and move the images to there?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 16, 2016 - 5:08 pm

Correct. We also added a new default avatars for moderators. It is most odd that this did not happen during the upgrade. Considering how long ago it was I am sure we would have heard from others yet this is the first such report.

Anyway - yes create the folder and move those three and then we will see of they reappear as they should!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Patricia Miller
Member
sp_UserOfflineSmall Offline
May 16, 2016 - 5:28 pm

OK so definitely some progress......

I now have a folder named /sp-resources/forum-avatars/defaults and moved the three images to there.

Now in Profiles>Avatar Options>Available Default Avatars I see those three images (yay!) so I know they are in the right place.  And the image for guest avatar *does* have "guest" checked.

However, when viewing the forum while not logged in, the upper left Avatar (which should be 'guest') still does not show, it's just the image placeholder with the question mark.....so possibly a problem with the Theme template?

I use a Child Theme of the css-only Theme, but have not modified the template files, just the CSS (with the exception of the spGroupView.php to comment out the unread posts list at the bottom).

Is there something I need to change in the Theme?

FYI, I do recall using the built-in WP update function when I updated to my current version of SP, but I don't recall if I skipped over a version in the process (?) it's been a while, but maybe that's why the folders didn't get reorganized as expected.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 16, 2016 - 5:30 pm

It doesn't matter if you miss a version - the upgrade still goes through everything needed since you last updated.

How about a double check after you clear your browser cache - just in case that is why it has not yet been found...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Patricia Miller
Member
sp_UserOfflineSmall Offline
May 16, 2016 - 5:40 pm

OK, cleared cache and tried again, still no image.

Here's a link, I'd be very interested in what you see...

http://www.bestallinclusive.co.....community/

You may remove the link or this post afterward if you like, the site is not yet ready for prime-time. 🙂

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 16, 2016 - 5:59 pm

Most odd. It is trying to load an image from 'http://www.bestallinclusive.com/community/mm/'. And looking at the HTML code at that point - it doesn't look like it comes form SP... So puzzling,

The template for that is the spHead.php template and the function called is sp_UserAvatar(). Worth a look to see if it is there as it should be.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Patricia Miller
Member
sp_UserOfflineSmall Offline
May 16, 2016 - 6:24 pm

Yep, most odd.

When I created the Child Theme, I just copied all of the templates to the new theme folder, and only modified the CSS (following the proper procedure to create a child theme, all else seems fine).

So I do have a file named spHead.php, and on line 80 of that file it does have this:

        sp_UserAvatar('tagClass=spImg spLeft');

But your last comments got me thinking about how this is setup - I first began working on this site over a year ago (it was put on hold for a while, then the project was greenlighted again) so I honestly can't recall why I set things up as I did (I'm pretty sure I would have just followed along with some instructions), but I setup a Page in WP (named "community") and in my SP settings I have that page ID and the template file specified under "Integration".

My page uses a template file called 'forum.php' which is basically a copy of my (WP theme's) page.php, in that it uses the content call get_template_part( 'content', 'forum' ).

In content-forum.php, it's just a standard template that calls the content - here is what is in that file:

`<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <div class="entry-content">
        <?php the_content(); ?>
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'quark' ),
            'after' => '</div>',
            'link_before' => '<span class="page-numbers">',
            'link_after' => '</span>'
        ) ); ?>
    </div><!-- /.entry-content -->
</article>`

Nothing out of the ordinary.  Every part of the forum works great - all seems as it should be, just this one odd bug with the default image not showing at the top.  On post topics and replies, they show as expected.

I did try regenerating the permalinks, both in WP and in SP, but it didn't make a difference.  I can't find any HTML or code that actually calls that image aside from the one line in spHead.php.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 16, 2016 - 9:13 pm

late to the game, but confused... I dont see any posts (didnt check every post) that would use default avatars.. can you link to one?

Is this still you avatar priorities?

Gravatars
WP Avatars
SP Default Avatars
Avatar Pool
Remote Avatars
Uploaded Avatars

If so, it wont get to default avatars...   it will find a gravatar since it will just display the gravatar default icon (mystery man, G icon, etc) if the address is not recognized...  if it doesnt find a gravatar, it will look for a wp avatar... and will find one...  so not sure how it would get to our default avatars...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620