There is no need to increment asset counters when an asset is not visible. This restriction not just makes sense but also enables us to put some boilerplate code into the asset service and the social activity counter service, namely the one responsible for enabling/disabling the counters for assets when they are trashed/restored or set invisible/visible.
To test this, you can do the following:
- Turn on social activities for wiki
- Create a new wiki page and add it to the welcome page
- Create a new user
- Log in with the new user, go to the new wiki page and comment on it
- Log back to the original user and add the User Statistics portlet to the page
- You should now see that the original user has some contribution points
- Move the created page to the trash
When the page is refreshed, you should see those contribution points gone.