Fix User Statistics page not allowing federated filter #564
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If you navigate to
/settings/stats
while logged in to an account, you'll see a normal stats page for users that we use for magazines and the overall site as well.However, if you attempt to use the dropdown that says
Local
and change it toFederated
, the page will be reloaded and the URL will get?withFederated=1
and the dropdown will stayLocal
. This is because the route and controller did not allow for setting federated status on the user stats pageThis fixes the route and passes that through the controller into the stat manager, just like magazine/overall do
There might be a bit of an investigation into why it was this way. Was it just never hooked up, or was there an issue? I don't see how this would be worse than magazine or overall stats. We could go the opposite way and just remove the dropdown from the user stat page so only local statistics are possible to view
I tested this with my dev environment... which only has local posts. So although I didn't see any issues with errors, I can't tell whether the numbers would be accurate as all my content is local