Shadab
Well-known member
If the "moderationCounts" key is missing from the data registry, it doesn't get rebuilt when _updateModeratorSessionCaches() is called in the abstract public controller. (executed on each page load)
In XenForo_Dependencies_Public::_handleCustomPreloadedData(), we have:
which sets the moderationCounts to null, in case the data is missing.
And in XenForo_ControllerPublic_Abstract::_updateModeratorSessionModerationCounts(), we have:
which always returns true (because it seems it doesn't check for null values). This prevents the cache from being rebuilt. I believe this is a bug; even though I can't find any situation where this data registry key gets deleted (except when running a delete query manually).
In XenForo_Dependencies_Public::_handleCustomPreloadedData(), we have:
PHP:
XenForo_Application::set('moderationCounts', $data['moderationCounts']);
And in XenForo_ControllerPublic_Abstract::_updateModeratorSessionModerationCounts(), we have:
PHP:
if (XenForo_Application::isRegistered('moderationCounts'))