Toggling reaction inactive and then active a while later doesn't work as expected

Xon

Well-known member
Affected version
2.2.8 Patch 1
Consider the following scenarios;
  • User A gives reaction 1 to a post
  • User A gives reaction 2 to a post
  • Admin disables reaction 1
    • The post shows reaction 2
  • Admin enables reaction 1
    • The post shows reaction 1 and reaction 2
And
  • User A gives reaction 1 to a post
  • Admin disables reaction 1
    • The post shows no reactions
  • User A gives reaction 2 to a post
    • The post shows reaction 2
  • Admin enables reaction 1
    • The post shows reaction 2
This inconsistency happens because rebuildContentReactionCache excludes disabled reactions when generating it's per reaction count cache, and this cache is used to indicate if reactions of a type have been given. This code already filters out disabled reactions on display.
 
Top