MyBB Community Forums

Full Version: ABP User Map
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2019-12-01, 09:36 AM)Eldenroot Wrote: [ -> ]Why? I had some weird issues with usernames and usergroups on my board. So yesterday I asked noyle for a help, he debugged this. First of all we thought it is an issue in MyBB core but... plugin issue. So I send you a bug report ASAP. Is tgere any issue with that?
There is no issue with that. I was just surprised that you contact Noyle before me, but peharps you catch him using discord ?

Btw, can you PM me the actual (and working) version of your plugin, it'll be simplest to use it.
@Crazycat - first of all I didnt know that the issue which I had is casued by your plugin (I use many plugins)... secondly we had (with @noyle) a discussion for the bug which was found by us week ago and I wanted to discuss this one.

I use the latest version from GitLab (MyBB extend site).

I can confirm, that @SvePu fix is working fine.
(2019-12-01, 12:32 AM)SvePu Wrote: [ -> ]You could fix it temporarily by replacing in "inc/plugins/abp_umap.php" the part (line #736) :
$users = $cache->read(CN_ABPUMAP);

with:
$userscache = $cache->read(CN_ABPUMAP);
$users = array();
if(!empty($userscache))
{
 $sql = implode(',', array_keys($userscache));
 $query = $db->simple_select("users", "uid, username, usergroup, displaygroup, avatar, aum_latlng", "uid IN ({$sql})");

 while($user = $db->fetch_array($query))
 {
 $users[$user['uid']] = $user;
 list($lat, $lng) = explode(',', $user['aum_latlng']);
 $users[$user['uid']]['lat'] = (float)$lat;
 $users[$user['uid']]['lng'] = (float)$lng;
 }
}

This is a really quick fix that only disables the plugin's itself cache on only the misc page. The original issue should still exist.

(2019-12-01, 03:53 PM)Crazycat Wrote: [ -> ]
(2019-12-01, 09:36 AM)Eldenroot Wrote: [ -> ]Why? I had some weird issues with usernames and usergroups on my board. So yesterday I asked noyle for a help, he debugged this. First of all we thought it is an issue in MyBB core but... plugin issue. So I send you a bug report ASAP. Is tgere any issue with that?
There is no issue with that. I was just surprised that you contact Noyle before me, but peharps you catch him using discord ?

Btw, can you PM me the actual (and working) version of your plugin, it'll be simplest to use it.

Yaa, Eldenroot and me were trying to find out something breaking MyBB's thread prefix filtering feature, which turns out an issue. After that he said there was another problem regarding the user name style issue that was bothering him a lot. We were thinking it might be another MyBB issue, but finally found out it was caused by this plugin.

I see similar function calling of format_name() in wildcard's MentionMe code, which also uses its own cache mechanism that potentially has the same problem as ABP_UMAP has. However, it seems that MentionMe has a better cache reloading strategy, or just because MentionMe is invoked more frequently than ABP_UMAP's user saving, which makes MentionMe's cache is somehow updated. I don't fully read MentionMe's code yet, so there's very few words I can say about it.
Ok, I wasn't sure that the fix given by SvePu was the same that you did. And thanks for the explanation of how was discovered this issue.

I will work on this issue and improve my cache management, I know I did it poorly Smile
(2019-12-01, 11:39 PM)Crazycat Wrote: [ -> ]Ok, I wasn't sure that the fix given by SvePu was the same that you did. And thanks for the explanation of how was discovered this issue.
No, I don't fix it. In contrast, I'm thinking if there's a variable from MyBB's core will hold user infos queried during the whole script processing so that every plugin can directly use fresh user data from that.
Pages: 1 2