Space watcher count on page creation
Problem: When a page is created and another user is watching the space viewtracker is registering the watching user as well as the creator.
How to reproduce:
Create a test space
Create a second user
Watch with the second user the test space
Create with the first user a page which contains the Viewtracker macro and the Table of contents macro
The output will be that there is only 1 view but in the table there will be 2 users
Thanks a bunch for the details and for delivering a fix so quickly. I'll look for this fix in a future update.
Dear Mr. Anderson,
The fix won't remove invalid views because technically they are valid views which are saved in the database.
I would give you here 2 SQL queries which are for the MySQL database. If you don't have MySQL you need to adapt them for your specific database.
I cannot stress enough here that you before executing them you should backup your database so you can go back if you deleted too much.
The first query gives you all views with the page title, time difference between page creation and visit time, visit time and page creation. With this data you will hopefully be able to make a judgment if these views need to be deleted.
I also have to say that to find these views isn't an exact science since you have set a maximum difference in seconds which I set to 100 seconds since in my tests I had very different differences: 1, 59 and 95.
If anything is not understandable or if you need help just ask freely.
Any word on if this fix removes invalid views from existing pages?
admin is a valid visit, all other users are invalid:
I'd also be interested in a way to remove incorrect view records that were added via this bug. I have tried to remove the Table of Contents after the problem occurs and it doesn't remove the incorrect views from the viewtracker table.