The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] Avatar not Updating

7 Posts
3 Users
1 Reactions
1,363 Views
(@aaronmckeon)
Posts: 47
Trusted Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 
[#7287]

We're experiencing an issue on our website where avatars are being updated in the user's profile but aren't changing in actual comment threads.  For example, see attached screenshots.  Can you please assist?  Thanks.

-- Aaron

user settings has avatar
no avatar in comments

 


 
Posted : 14/04/2023 11:44 pm
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi Aaron,

Please let us know how the avatars are being uploaded. Do you use some specific plugin? Are all caches deleted properly before checking?  


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 15/04/2023 12:24 pm
(@smilebeda)
Posts: 27
Eminent Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi @asti - Beda here, I work with Aaron on this project.

We are using the default WordPress `get_avatar_url` filter ( https://developer.wordpress.org/reference/hooks/get_avatar_url/ ) to modify the avatars of users on this website.
We pass it a value of an Image URL stored in a User's meta. Works great on every instance where someone uses `get_avatar_url`.

I debugged the code we use, and confirmed that the filter _always_ returns the right image URL even in the WP Discuz comments section, but, for some reason WPDiscuz seems to alter that _after_ (or independently of) WP avatar filter, thus resulting in an `img src` value that is not filtered and therefore our custom images are not loaded, instead, the _gravatars_ of those users are loaded.

So I suspect, just like you have a filter to alter the _url_ applied to that avatar (and username) on WPDiscuz (`wpdiscuz_profile_url`) you probably have a filter to alter the _image src_ value  - maybe something like `wpdiscuz_profile_img_url` - that we can hook our code to?

I have found https://wpdiscuz.com/docs/codex/filters/wpdiscuz_author_avatar_field/ , but this is inadequate - we do not want to get avatar by another email or user id values, we want to put our own modified URL there (it is actually an URL stored in a User Meta Field, but this really should not matter)
https://wpdiscuz.com/docs/codex/filters/wpdiscuz_avatar_link_attributes/ also is inadequate since it seems to target the _link_ wrapping the img (so not allowing us to change the img src attribute)

Could you point me to the right filter you use so I can hook our code to that one as well and return a modified img src value?


 
Posted : 17/04/2023 5:58 am
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi Beda,

The developers are checking this problem. I'll update this topic once I get a response from them. 


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 17/04/2023 12:26 pm
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Dear Beda, Aaron,

This is a cache issue for sure. Please delete all kinds of caches (server-side, website, wpDiscuz, browser) before checking. 

The wpDiscuz caches can be deleted in the Dashboard > wpDiscuz > Settings > General Settings tab. The option is called "Purge Comment and User Caches". 


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 17/04/2023 12:44 pm
(@aaronmckeon)
Posts: 47
Trusted Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@asti I have taken your advice and avatars seem to be displaying correctly now.  That said, will this problem continue to happen every time we update the user's avatar?  Are there any wpDiscuz hooks we can use to force the avatar cache to clear for just a single user in wpDiscuz whenever we use the WordPress hook as described by Beda?

Thanks!


 
Posted : 17/04/2023 2:32 pm
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@aaronmckeon,

I may suggest you just disable the wpDiscuz Cache option. It's located in the Dashboard > wpDiscuz > Settings > General Settings tab. 

image

In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 17/04/2023 2:39 pm
aaronmckeon reacted