Closed Eldenroot closed 5 years ago
Thanks for the report. As I'm sure you've noticed, I am having trouble finding free time right now. When I return I will try to catch everything up.
@Eldenroot can you give me steps to reproduce. I had some time this evening to try it out, but PNG images are working correctly on my end.
Hi @WildcardSearch - ok, let me explain.
I used avatar with .jpg extension but I convert it to .png one. I tried to rebuild the cache, but mentionme still loads old url of avatar
As you can see in my browser console, it should be avatar_1.png not .jpg. When I change my avatar back to jpg it works fine...
You just need to rebuild the name cache (from the ACP Plugins page) before the correct avatar will show. The avatar URL is cached with the rest of the user info.
Sorry, I didn't realize this was the problem or I would have given you this advice when you first created the issue.
Ok, but this task should be run automatically every 24 hours... but this issue with avatar has been there for over 4 weeks, so apparently it is not working somehow.
Did you try to run the name cache rebuild link?
I'll be home in about five hours and will try again to reproduce the issue. Sorry you are having problems.
Yes I did, after I clicked to link in ACP-Plugins the issue was fixed...
That might mean that there is an issue with the task running. Can you check the task log to ensure that the task is in fact running once per day?
OK, I will check this tomorrow. I will let you know.
@WildcardSearch - task seems to be fine
Okay check that off the list. Can you go to ACP -> Tools & Maintenance -> Cache Manager and look for wildcard_plugins cache entry -> mention_me section
See if the avatar filename is stored correctly in the cache when you have recently changed avatar extensions.
Sorry to ask you to do so much but I just want to try to find an issue if one exists.
When I change my avatar from .png to .jpg - > there is no change in the cache - still shows .png avatar path. Maybe can you add support for run rebuild cache automatically cache when avatar is changed?
Yes. That sounds like a good idea.
I'll just convert this issue over to an enhancement request for that feature.
Or just maybe make task run time period shorter... much easier :)
I think the most comprehensive solution is to isolate events that may change the cache information, hook in, and rebuild the cache at these points— much like the rebuild_settings
function.
Your thoughts?
Great idea! Is that possible with MyBB existing hook system or some hooks will be missing?
It would be difficult for me to say without having a closer look, but when I checked yesterday (quickly) it seemed doable by hooking into: the ACP pages for user/group editing, the UCP pages for account changes, and the banning pages.
I'll probably put this off until 3.3, given the large scope of these changes.
@Eldenroot I took a look at it this evening and there are dozens of places where the user's information can change. There are hooks in some places and not in others, but the main thing I gathered from it was that it would make MentionMe a lot heavier and I don't think we want that.
I am going to go ahead with 3.2.6 and we can keep looking at what can be done about this issue.
OK, I would suggest to refresh the cache when plugin settings is saved... :) As we discussed on Discord
Done and working on my end, @Eldenroot
Profile images are not loaded in popup menu - this is a little annoying bug - if you use avatar picture in .png format it is nor working because mentionme uses automatically .jpg images in the URL.
@WildcardSearch